Types
Andy C++ is currently a dynamically typed language, that means that type checks are performed at runtime. Although you currently can’t annotate your variables using type names they do have types at runtime.
The type system is hierarchical with the root type being Any:
- Any
- Option
- Boolean
- Number
- Integer
- Int64 (64bit signed)
- Bigint (unlimited size)
- Float
- Complex
- Rational
- Integer
- Sequence
- String: A mutable list of characters
- List: A mutable list
- Tuple: An immutable list
- Map: A hashmap that associates keys with values
- Deque: A double ended queue
- MinHeap & MaxHeap: Min/max Heap
- Iterator: A type that can be consumed and produces values (Currently only used for range expressions like
5..100)
- Function
Note:
Anyis the base type for all other types. When you declare a function, its arguments default to typeAny. Currently, theAnytype is implicit and does not appear explicitly in the language.