About primitive types

Alore has a fixed set of primitive types: Int, Str, Float, Boolean, Constant, Function, Type, Tuple, Pair and Range. Primitive types share these common properties:

  1. They are defined in the std module.
  2. Other types cannot inherit from primitive types.
  3. Their instances are immutable.
  4. Their instances support comparison for equality and hash value calculation with std::Hash.
  5. All primitive type constructors that accept arguments accept also objects of their own type to construct identical copies of them, so that Int(5) and Str("foo") are valid, for example.

Additionally, most primitive types have special syntax associated with creating instances of them.