Silt Language Guide

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:

Language Features

  • 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

  • Concurrency — CSP model, tasks, channels, select, fan-out patterns