Experimental documentation — Work in progress
This page has not completed the documentation audit. Current documentation version: experimental.
Language reference
Use this section when you need the exact rule for a piece of Sagan syntax or behavior. If you are learning the language in order, begin with the language tour instead.
- Lexical specification explains how source text becomes tokens, including Unicode and emoji identifiers.
- Grammar, declarations, expressions, and statements define the language's written forms.
- Type system explains inference, conversions, generics, optionals, collections, geometry, and measured values.
- Classes, faces, and composition defines Sagan's composition-first object model.
- Exceptions, modules and packages, and the memory model cover larger program behavior.
- Built-in unit catalog lists the scientific units supplied by the compiler.
These pages describe implemented behavior unless a paragraph explicitly says a feature is deferred. Every page remains work-in-progress until it has received the project's human documentation audit.