Keywords
Source of truth: KEYWORDS in the compiler lexer (interpreter.py). This table is the implemented set.
Implemented keywords
Section titled “Implemented keywords”| Kind | Keywords |
|---|---|
| Declarations | fn, function, struct, class, enum, interface, type, let, var, pub, import, as, dyn, open, extends, override, new, static, async |
| Control | if, else, while, for, in, match, switch, case, return, break, continue, try, catch, await |
| Memory | region |
| Capabilities | needs, with |
| Contracts | requires, ensures, result |
| Logic | and, or, not, true, false |
| Effects / DX | print, eprint |
| Tests | test, assert |
Notes:
functionis accepted;vow fmtnormalizes it tofn.class≡structfor data layout; inheritance addsopen/extends/override.new Type(…)callsType.newwhen defined.switch/casedesugar tomatch(same exhaustiveness).try/catchhandleResultlocally (not OS exceptions).async fn+await— cooperative async runtime with real yield points (db_query,read_file_async,spawn_blocking,async_sleep). Sync code calls async fns viablock_on. See Async / await.dynmarks dynamic interface values (Array<dyn Shape>).regionopens a sub-arena scope.resultis meaningful insideensures.- Match wildcard
_is a pattern token, not listed inKEYWORDS. - Full walkthrough: Tutorial / Syntax ergonomics
Prefer keywords over C punctuation
Section titled “Prefer keywords over C punctuation”| Avoid | Prefer |
|---|---|
&& / || / ! |
and / or / not |
Design-reserved (future)
Section titled “Design-reserved (future)”Still not language features: comptime, unsafe. Avoid as identifiers.
Prelude / type names (not keywords)
Section titled “Prelude / type names (not keywords)”int, int64, f32, f64, bool, String, Array, Map, Option, Result, Some, None, Ok, Err, Caps, FsRead, FsWrite, Net, Env, Clock, Rand, Proc, Threads, Thread, Process
Aliases: FileRead → FsRead, FileWrite → FsWrite, i32 → int, i64 → int64, string → String.