| title | Language Guide |
|---|---|
| section | Guide |
| order | 2 |
| description | A complete reference to silt's features: pattern matching, types, traits, closures, concurrency, and error handling. |
Silt is a statically-typed, expression-based programming language with full
immutability, pattern matching as the sole branching construct, and CSP-style
concurrency. File extension: .silt.
This guide is split into focused pages:
- Bindings and Functions --
let,fn, closures, trailing closures, early return - Types -- primitives, enums, generics, records, tuples, recursive types, type ascription
- Generics -- type parameters, constraints, bounded polymorphism, type-directed dispatch
- Pattern Matching -- match, literals, constructors, tuples, records, lists, maps, or-patterns, guards, ranges, pin, when/else, exhaustiveness
- Error Handling -- Result, Option,
?operator, when let-else, Never type - Collections -- lists, maps, sets
- Loops, Pipes, and Other Features -- pipe operator, string interpolation, loop expression, ranges, comments
- Operators and Precedence -- full operator table, precedence, associativity, newline rules
- Traits -- declaration, implementation, Self type, built-in traits, where clauses
- Modules -- file-based modules, imports, built-in modules, standard library
- Testing -- test runner, assertions, file and function conventions
- Design Decisions -- trade-offs and rationale behind language choices
- Concurrency -- CSP model, tasks, channels, select, fan-out patterns
- Strict-effects migration guide -- enabling
--strict-effectsto enforce effect annotations on user functions