2: Language Semantics
Sub-files
- core.md (~332 lines) — Core language rules
- 2.0: Statement Delimiting and Block Syntax
- 2.1: Scoping
- 2.2: Mutability
- 2.3: Visibility
- functions.md (~483 lines) — Functions, closures, and type inference
- 2.4: Closures and Nested Functions
- 2.5: Function Types
- 2.6: Variance
- 2.7: Type Inference
- 2.8: Variable Type Annotations
- 2.9: Return Types
- values.md (~796 lines) — Values, numeric types, operators, and strings
- 2.10: Constants
- 2.11: Numeric Types and Literals
- 2.12: Operators
- 2.13: Strings
- patterns.md (~597 lines) — Destructuring, comments, variadic functions, and evaluation order
- 2.14: Destructuring, Spread, and Shorthand Syntax
- 2.15: Comments
- 2.16: Variadic Functions
- 2.17: Evaluation Order
Topic Cross-References
- Destructuring: patterns in this chapter (§2.14), pattern matching in types.md (§3.1)
- Operators: defined here (§2.12), interface requirements in stdlib/interfaces.md
- Closures: defined here (§2.4), function types (§2.5), variance rules (§2.6)
- Numeric types: literals and rules here (§2.11), methods in stdlib/functions.md