Core syntax
Indentation handles local control flow; named structural blocks end with END name.
If you know Python, C++, or TypeScript, most Axiom syntax reads naturally. The unusual parts are the lack of class/struct, meaningful indentation, and explicit END name for structural declarations.
Functions
1clamp(i32 value, i32 lo, i32 hi) -> i32:2 require lo <= hi3 if value < lo:4 RETURN lo5 if value > hi:6 RETURN hi7 RETURN valueName, parameters, arrow, return type.
A precondition.
An indented if block; there is no END if.
The return is visually explicit.
A second branch.
Fallback return path.
Types are structural blocks
1point:2 f32 x3 f32 y45 length_squared -> f32:6 RETURN x * x + y * y7END pointStarts a named type; no struct keyword.
Field x.
Field y.
A method.
Named structural blocks end with END point.
Visibility
Members are public by default. private is explicit. Axiom intentionally avoids a larger access-control vocabulary when contracts and capabilities carry most of the design weight.
1counter:2 private u64 value34 increment:5 value = value + 167 get current -> u64:8 RETURN value9END counterPrivate storage.
Public method by default.
get means callers should not silently discard the returned value.