01 · LanguageSmall, strict, no surprises
Everything is an expression. There is no null, no exceptions, no implicit conversions and no loops.
TypesInt (64-bit), Float, Bool, Unit, Str, Bytes, List[T], Map[K, V] (ordered by key), Option[T], Result[T, E] and function types.
Records and variantsYour own types as a record or as an enumeration with data.type Shape = Circle(Int) | Rect(Int, Int) | Dot
GenericsGeneric types and functions; type arguments are inferred at the call.fn swap[A, B](p: Pair[A, B]) -> Pair[B, A]
Exhaustive pattern matchingPatterns with constants, variants, records and guards. Every match has to cover every case.
ClosuresAnonymous functions that capture their surroundings. Values are immutable; functions are values.map(xs, fn(x) => x * k)
Effects in the typeWhoever reads, writes or goes to the network says so: !io !fs !time !rand !net !db !model. Callers carry the union.
Effect polymorphismA function takes on its callback's effects; with a pure callback it stays pure.fn each[T, !e](xs: List[T], f: fn(T) -> Unit !e) -> Unit !e
Recursion instead of loopsA call in tail position is a loop. Lists are processed with map, filter, fold and range.
Exact integersa * b / c is computed exactly with a 128-bit intermediate. A real overflow and division by zero stop the program instead of computing on wrongly.
Placeholderstodo() stands for a missing body of any type; executed, it stops with E0540.