Skip to content

Dialect

Jiowcl edited this page Jul 20, 2026 · 2 revisions

Dialect

Use -- vyrn: 12 (or 10 / 11 for partial features) for:

Feature Dialect Example
Struct optional fields / methods 10 y: number = 0, def length(self)
enum 10 enum Color { Red, Green }
Named import 10 import { a, b } from "mod"
Import alias 10+ import { run as fn } from "mod"
import * as m 11 import * as M from "mod"
[doc: "..."] on def / struct 11 Shown in --dump output
Struct name as type 11 def f(p: Vec2) checks table at runtime
enum Name: number 12 Explicit enum value type (numeric members)
Chained . access 12 obj.a.b in expressions
@doc("...") 12 Sugar for [doc: "..."]
[deprecated] 12 Compile-time warning + --dump metadata
Struct field [doc] 12 p._fielddocs.fieldName at runtime
Bench header / --bench 12 Raised loop/instruction limits
unlimited header / --unlimited 12 Disable loop/instruction/call-depth caps
timing header / --timing 12 Print wall time + instruction count at end
timeout SEC header / --timeout SEC 12 Wall-clock limit (sampled with GC interval)
Table GC 12+ runtime Mark-and-sweep
Dynamic stack / globals 1.3.1+ VM stack and compiler locals/globals grow via ReDim
GC roots (upvalues / frames) 1.3.2+ Closed upvalues and active frame slots included
--strict / header strict 1.3.2+ literal checks; 1.4+ local/arithmetic inference
IO file objects 1.4+ io.open → table with methods; file type alias

Anonymous Functions

Syntax Dialect
function() … end any .vyrn dialect
def() … end dialect ≥ 8

Clone this wiki locally