Variables always sit in single quotes. Types, functions and fields are bare words.
let 'x' := 1000;MAIN {
std::print.stored.stdout["Hello, World!", \n];
}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, written bare.
return 'xs'[1];A string is exactly its characters. The newline is its own piece.
std::print.stored.stdout["Hello, World!", \n];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'] == 0 { fail empty; }# runs to the end of the line.
# like thisEvery 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.