This section will be the normative language reference. It is intentionally separate from the language guide: guide pages teach use; specification pages define accepted programs, static semantics, runtime behavior, diagnostics, and desugarings.
Planned chapters
- Lexical structure, tokens, comments, literals, and source encoding
- Names, scopes, visibility, modules, and imports
- Types, inference, coercions, subtyping, generics, and traits
- Patterns, bindings, places, ownership, and mutation
- Expressions, statements, blocks, and control flow
- Functions, closures, calls, methods, and dispatch
- Data declarations: structs, enums, errors, aliases, and implementations
- Effects, suspension, tasks, streams, and host operations
- Built-in types and prelude contracts
- Grammar and diagnostic requirements
The existing docs/grammar.md is an input to this work, not yet the canonical
grammar; it still contains removed and renamed forms.