AXIOM Axiom Documentation
UABLACKGRAYWHITE
Axiom · light

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

Indentation inside a functionAxiom
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 value
1

Name, parameters, arrow, return type.

2

A precondition.

3

An indented if block; there is no END if.

4

The return is visually explicit.

5

A second branch.

7

Fallback return path.

Types are structural blocks

Product typeAxiom
1point:2    f32 x3    f32 y45    length_squared -> f32:6        RETURN x * x + y * y7END point
1

Starts a named type; no struct keyword.

2

Field x.

3

Field y.

5

A method.

7

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.

private + getAxiom
1counter:2    private u64 value34    increment:5        value = value + 167    get current -> u64:8        RETURN value9END counter
2

Private storage.

4

Public method by default.

7

get means callers should not silently discard the returned value.