Variables always sit in single quotes. Types, functions and fields are bare words.
let 'x' := 1000;MAIN {
stdkit::print.stored["Hello, World!", newln];
}Hello, World!Variables always sit in single quotes. Types, functions and fields are bare words.
let 'x' := 1000;let binds a valueUse let to introduce a value. := infers its type; with =, write the type explicitly.
let 'x' := 1000;
let 'n': int32 = 5;changeDeclare a value mut before changing it. change marks an assignment.
let mut 'x' := 1000;
change 'x' = 2000;Arguments go in [ ], not ( ).
add[1, 2]plus, minus and times are operators. Division and remainder name their rounding, such as div.floor and mod.floor; pow raises to a power.
let 'by3' := ('n' mod.floor 3) == 0;The first element is position 1, and every position says pos.
return 'xs'[pos 1];A string is exactly its characters. The newline is its own piece, newln.
stdkit::print.stored["Hello, World!", newln];The caller says whether it lends, gives or copies.
describe[lend 'l']The thing on the left, made more specific: str.utf8, lend.mut, list.length.
if list.length[lend 'xs'] equal_to 0 { fail empty; }# runs to the end of the line.
# like thisequal_to, not_equal, at_most and at_least; only < and > stay symbols.
while 'i' at_most 'limit' {Every overflow and bounds check is proven at compile time — or the program doesn’t build.
Every value has one owner. give, copy and lend say what happens to it.
:= picks the best typeWorked out from the whole program. A value from outside needs its type written.
str.utf8, lend.mut, list.length, map.ordered — one small rule, everywhere.
-> T or fail[name], handled with otherwise.
Native code, through LLVM.