Skip to content

Value Types

TheRealMichaelWang edited this page May 6, 2021 · 4 revisions

Value Types

Since FastCode aims to automate as much value-typing as possible, it maintains a minimal number of data types.

Primitive Data Types

  • Numbers - Any numerical value is represented as a standard IEEE float.
  • Characters - Characters are represented as unsigned, byte-sized values.
  • Null - null has its own type. It can be referenced using the null keyword.

Note: If you're wondering how conditionals are evaluated without a primitive boolean type, see this wiki page.

Reference Data Types

  • Structures - Each structure has a list of properties which be accessed and used like variables.
  • Arrays - For speed improvements, Arrays are NOT implemented as a linked list. That being said, array concatenation is MUCH slower. For further reading about arrays and how strings are implemented, please refer to this wiki page. It should also be noted that linked list implementations in FastCode are slower due to garbage collection.

Type Checking

FastCode is dynamically type checked, so you don't have to worry about specifying any types beforehand.

Clone this wiki locally