Skip to content

Language overview

ZZ is a small systems language for services, CLIs, and data pipelines.

  1. Values, not references. Variables hold independent values. Functions receive copies. There is no &, no borrow checker, no aliasing to reason about. See Value semantics.
  2. Inferred, then checked. := infers, : T = pins. The checker unifies types and reports every error in one pass with a fix hint. See Checker.
  3. Pipelines over nesting. |> passes left as first arg. match + ? + ?? keep happy-path code flat.
  4. Same on VM and native. zz run (VM) and zz build (AOT) agree bit-for-bit on ints/floats. If they could diverge, the checker errors instead. See Parity.
import std.http
struct User { name: str, age: int }
func adult(u: User) -> bool {
return u.age >= 18
}
func main() {
users := [User{ name: "Ada", age: 36 }, User{ name: "Bo", age: 12 }]
names := [u.name for u in users if adult(u)]
println(names) // ["Ada"]
s := http.server()
s = s.route("GET", "/", |req| "ok")
println("routes ready")
}