Language guide
Python-readable syntax with native escape hatches.
This page documents the stable core first and points experimental surfaces to the stability map.
Functions
fn add(a:int, b:int) -> int:
ret a + b
fn main() -> int:
say add(2, 3)
ret 0
Structs
struct Pair:
left:int
right:int
fn main() -> int:
p:Pair
p.left = 4
p.right = 5
ret p.left + p.right
Control flow
i:int = 0
while i < 5:
if i == 3:
break
say i
i = i + 1
Unsafe pointer block
fn main() -> int:
p:*char = malloc(16)
unsafe:
p[0] = 65 as char
free(p)
ret 0