@head @module std @title About primitive types

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

  1. They are defined in the @ref{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 @ref{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.