Language specification
Normative Spec 1.0 freeze — what the compiler implements today.
Spec 1.0 freeze
Frozen: 2026-07-09 with release v0.0.1. Parser or ABI breaking changes require an RFC and minor version bump.
| Decision | Resolution |
|---|---|
| Modules | import "path.ny", import { name } from "path.ny", module name, nyra.mod |
| Generics | Syntax + monomorphization at compile time |
| Concurrency | spawn { }, channels, async/await |
| Memory | Copy/Move, borrow checker, NLL basics, auto-drop heap strings |
| Enums | Tag-only variants (i32); no ADT payloads |
Out of scope v0.2
- Enum variant payloads
Color.Red(x) - Full
Option<T>/Result<T,E>with stored payloads ?operator
Core surface
- Types:
i32,bool,string,void,struct,enum,[T; N],[T],&T/&mut T - Statements:
let,const,let mut, assign,if,while,for x in a..b,return,print,spawn,defer,async fn - Expressions: literals, calls, methods, field/index, struct/array literals,
match(with guards), if-expressions,await - Modules:
import, multi-filemain.ny - OO:
impl Type { },impl Type for Trait { } - FFI:
extern fn,export fn - Toolchain:
nyra run|build|check|test|fmt|diag|lsp|pkg
Grammar (highlighting only)
TextMate grammar: Editor setup · grammar/nyra.tmLanguage.json