Copied

Learn DEXA in ~5 minutes

What's implemented now. Parser → typechecker → DX-IR → interpreter.

DEXA — the DXA smart‑contract language (.dxa files, dxc compiler on dxa.dev).

int, float, bool, string, unit, address, model records. No implicit coercions; address("...") required.

let a: int = 42;
let pi: float = 3.1415;
let ok: bool = true;
Run in Playground →

Top-level let runs as-is. Add fn main() -> int { return 0; } to return a value from the program.

fn with typed params; return type optional (defaults to unit). Calls typechecked for arity and types.

abs, min, max, sqrt, len; plus print, address, require. No need to define these yourself.

fn main() -> int {
    require(abs(-7) == 7 && sqrt(4.0) == 2.0, "abs/sqrt");
    require(min(1, 2) == 1 && max(1, 2) == 2 && len("hi") == 2, "min/max/len");
    return 0;
}
Run in Playground →

if/else (bool). require(cond) / require(cond, "msg") — on false, execution aborts with RequireFail.

let vs let mut; block shadowing. while, loop, break, continue — wired through parser → IR → interpreter.

Model: implemented. Contract: design preview (asset<T>, DX-VM planned). See Docs and repo examples.