Skip to content

Latest commit

 

History

History
37 lines (28 loc) · 2.03 KB

File metadata and controls

37 lines (28 loc) · 2.03 KB
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 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

Other Guides