Under heavy development. This site describes the intended 1.0 language. Current features and performance vary. Development status
Sn50SnThe SnAPI programming language
Snapshot · Oct 24, 2026 · Frozen documentation

Generics & concepts

Reusable code with static requirements.

Sn is under heavy development. This reference includes the intended 1.0 design; features may be incomplete in the current compiler. Read the status →

Generic parameters

Sn uses angle-bracket parameter lists for generic types and functions. Value parameters use const N: Type.

Concepts

Concepts express compile-time structural requirements. Generic constraints use where T: Concept clauses. The intended model checks a generic body before materializing reachable concrete instances.

Static by default

Concepts do not introduce runtime identity, vtables, witness dictionaries, or reflection lookup. Dynamic dispatch is reserved for explicit virtual or interface call boundaries.

Bounded resolution

The design excludes speculative candidate search, SFINAE, and argument-dependent lookup. Only documented requirement forms are admitted; arbitrary compile-time predicates are not automatically supported.

Practical use

Inspect the public signatures of Vector, iterators, and allocator APIs for concrete generic requirements. Availability and exact constraint spellings depend on the selected documentation and toolchain version.

Documentation snapshot: October 24, 2026 About versions ↗
Searching Development · language & standard library