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

Structs & classes

Data and lifecycle have different roles.

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

Data structs

The accepted design distinguishes aggregate data structs from classes with lifecycle behavior. Struct data composition carries constrained, predictable copy, move, and default behavior.

Lifecycle classes

Classes remain native inline values; the keyword does not imply a managed heap object. Construction and destruction follow explicit lifecycle contracts, and allocating an object remains a separate operation.

Copy and move

Copy and move capabilities are type-defined and may be generated, controlled, or rejected under the lifecycle rules. A move does not imply that every class resets to a default value. The source standard-library declarations show concrete accepted ownership patterns.

Public surface

Use pub to expose declarations and members. Public APIs define the lifetime, mutation, and invalidation guarantees callers can rely on.

Readiness

Object-model details have evolved during development. Consult the selected version's API signatures and examples rather than treating older single-struct design notes as current language contracts.

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