Skip to content

Part I: The Language

Part I covers the language itself: values and types, functions, control flow and pattern matching, records and enums, text, numbers and units, error handling, collections, generics, a first look at loci, and testing. Everything in this part works in standalone scripts, CLI tools, and long-lived services alike. The std::* modules for I/O, networking and telemetry are in Part II.

fn main() {
let total = 19.99d * 3.0d;
println("Three at $19.99 is $", total);
}
  1. First-class financial, temporal, and physical types: Decimal (19.99d), Duration (250ms, 5s), Time, and user-defined dimension/unit/quantity types are built into the language rather than bolted on as wrapper libraries.
  2. Value-level errors (fallible(E)): Functions that can fail declare fallible(ErrType) in their signature. Callers must explicitly handle the error channel at the call site using or (or default, or raise, or handler(err), or { ... }, or discard).
  3. Arena-backed collections (@form): Instead of heap-allocated generic Vec<T> or HashMap<K, V> values, dynamic collections are loci annotated with @form(vec), @form(hashmap), @form(set), @form(ring_buffer), @form(lru_cache), or @form(heap).
Section Chapters
Basics Values, Types & Variables · Functions · Control Flow & Pattern Matching · Records, Enums & Set Types
Data Strings & Bytes · Numbers, Money & Time · Units of Measure · Error Handling (fallible) · Collections (@form) · Generics
Components & Testing Introduction to Loci · Testing & Benchmarking

Next: Values, Types & Variables.