Draft / Experimental: Zith documentation describes a language under active development. Check Implementation Status before relying on a feature.

Bindings

Use let for an immutable binding and var when the binding will be reassigned. const and global are also part of the language, and all four forms work in the current compiler.

let answer: i32 = 42;
var count: i32 = 0;
count = count + 1;

Be aware that const currently means immutable, not compile-time evaluated. There is no comptime evaluation yet, so do not read const as a request to fold a value during compilation.

Destructuring and the full mutability model are specified in the Bindings reference.