The ALTernative Language
Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Back to homepage


In ALT there is no need for compile time type checking, as values and types are both the same thing. So typechecking in ALT is the same as running a program with bags of input values, as opposed to a single input value.

ALT may be the first programming language (except CUE) that has typechecking at runtime, whatever that means!

Primitive values

The following primitive values/types are available:

  • _: any value
  • number: all fraction intervals of infinite size
  • char: all character intervals of finite size
  • boolean: two boolean values, true or false
  • null: a singleton value
  • !_: not any value (none)

Compound values

More complex structures can be created with the following compound values/types:

  • sequence: an ordered sequence of values, specified by a regular expression
  • string: a sequence of char intervals
  • list: a scoped array of values with a possible infinite tail.
  • pair: the product of two values
  • struct: a scoped and ordered set of disjunct pairs