Types
Every type bet can represent today: scalars, strings, structs, sum types, arrays, SIMD vectors, arena handles, and more.
bet is statically typed with local inference, so lowkey x = 5 figures out int on its own. When
you want a specific type, spell it out with an annotation (lowkey x: i32 = ...) and the compiler
takes you at your word. tag, crib, and soa are keywords that moonlight here in type position;
everything else below is a predeclared type name or constructor.
Casts: expr as T
Conversions are always explicit; bet will never narrow a value behind your back. You ask for the
cast, and the compiler picks the right conversion from the operand and target types: integer
to integer, integer to float, an f32/f64 resize, or a same-size bit reinterpret.
lowkey small = 300 as u8 // truncates / wraps -> 44
lowkey n = 3.9 as int // truncates toward zero -> 3
Every type
ref and the tuple type are compiler-produced, meaning you’ll run into them (a holla live binding,
or a multi-value return) without ever writing them out as standalone annotations yourself.
Boolean value. Literals are the keywords nocap (true) and cap (false).
Signed 8-bit integer.
Signed 16-bit integer.
Signed 32-bit integer.
Signed 64-bit integer.
Unsigned 8-bit integer — also the byte type.
Unsigned 16-bit integer.
Unsigned 32-bit integer.
Unsigned 64-bit integer.
The default integer (signed, 64-bit).
Unsigned 64-bit integer.
32-bit IEEE floating-point.
64-bit IEEE floating-point.
The default float type. Integral values print with a trailing .0.
The no-value type: a function that returns nothing has return type void. Also the element type of an untyped bump crib.
Alias for the unit type void.
A UTF-8 string value, a fat { ptr, len } pair; indices are byte offsets. A single-quoted byte literal 'A' has type u8.
A record type with per-field visibility (flex exported, hush/unmarked private). Structs are values — assignment copies. Supports Go-style methods and generics (drip Pair[T]).
A tagged union: a discriminant plus a payload; variants may carry payloads or be nullary. Matched exhaustively with vibe (naw is the wildcard).
A fixed-size, inline array of N elements (e.g. [10, 20, 30] infers [3]int).
A fat { ptr, len } view over a run of T (same layout as str). mem.slab[T](n) yields a zeroed slice; str.bytes(s) yields a []u8.
Not spelled as a standalone type; carries a multi-value return as one value, produced and consumed with commas. Compiler-produced.
First-class fixed-width SIMD vectors that lower to real LLVM vector ops. Named <elem>x<N> with N ∈ {2,3,4}: f32x4, f64x2, i32x4, u8x4, … Element-wise + - * / and integer shifts; lane reads .x/.y/.z/.w; methods .dot .sum .min .max .abs .scale .length .norm.
Float SIMD aliases: vec2 = f32x2, vec3 = f32x3, vec4 = f32x4.
A keyword layout modifier that transposes a container of a flat drip to struct-of-arrays: soa T[N], soa []T, soa vec[T]. Element access reads the same (ps[i].field); whole-element operations are a compile error.
An 8-byte generational handle (Tag { slot, generation }) into a typed crib. Plain copyable data; you cannot deref it directly — reach data via holla (checked) or trust (unchecked).
A crib (arena) handle used as a parameter or field type, so functions can take the arena they allocate into.
A resolved, guaranteed-live reference into a crib element. Compiler-produced — what a holla live-arm binding and trust() yield; not spelled yourself.
A hash-map handle. Operations: stash.new[K,V](), .put, .peep (returns (V, bool)), .yeet, .gang (count).
A growable array handle (distinct from a fixed [N]T). vec.new[T](), .stack, .pop, .gang, indexing, squad iteration; vec[u8] doubles as a string builder.
An opaque seeded-PRNG handle from math.cook(seed) (xoshiro256**). Methods .roll(), .frac(), .upTo(n). Deterministic across interp and compiled.
A first-class function value; functions are passed by name and stored in variables or struct fields (v1's dispatch mechanism — no interfaces/traits yet).
The error type for Go-style (value, yikes) returns. yikes.new("msg") constructs one; .tea("context") wraps one; ghosted is the nil error.