Skip to main content

AILANG vs Zero

On 15 May 2026, Vercel Labs published Zero, a new language with the tagline "The programming language for agents." AILANG has been working that same thesis since 2024. This page is a side-by-side comparison and an honest read on what each language gets right.

Bottom line

Zero and AILANG are not competitors. They're two halves of the same hypothesis: agents need languages designed for them, not languages designed for humans that agents tolerate. Zero stakes out agent-authored systems software (Rust-shaped, native, manual memory). AILANG stakes out agent-authored applied/reasoning code (Haskell/OCaml-shaped, GC, effect rows, LLM-native primitives).

The convergence

Both languages independently arrived at the same core principles:

PrincipleZeroAILANG
Explicit effects in signaturesraises { ErrSet }! {IO, FS, Net, Clock, AI}
Capability-object I/O (no globals)World parameterCapability handlers + budgets
Machine-readable diagnostics--json everywhere--json on key commands
Determinism as a design goalBounded compile-time evalA1–A12 Design Axioms
Compiler as an agent toolzero fix --plan --jsonailang chains, MCP server
Stable skill/prompt metadatazero skills (7 modular skills)ailang prompt (single versioned blob)

When two teams arrive at the same answer independently, the answer is probably right.

The divergence

Where the languages differ matters more than where they agree, because the differences reflect what kind of agent code each language is for.

DimensionZeroAILANG
ParadigmImperative, C-family, statementsPure functional, everything is an expression
CompilerNative, written in C, emits linux-musl-x64 / wasm executablesGo-hosted, tree-walking + bytecode VM, interpreted
Type systemWidth-explicit primitives (i8u64), generics via monomorphization, no inferenceHindley–Milner inference + row polymorphism + type classes
MemoryManual: owned<T>, drop(), defer, ref<T> / mutref<T>, borrow checkerGC-backed; no manual lifetime management
Effectsraises { ErrSet } — primarily error effects + capability paramsFull row-polymorphic effect rows
Error handlingcheck expr / raise X / rescue err {} (algebraic-effects-lite)Result[T,E] ADT + ? propagation
ConcurrencyNone documentedEffect-typed Fork / Call / Done
LLM primitivesNonestd/ai with call, callJson, callJsonSimple
FFIextern c "config.h" as configGo interop via embedded mode
Compile targetStandalone native binariesREPL + bytecode VM
Repository age2 days (May 2026)v0.20, multi-year

Side-by-side: "hello world"

Both languages agree that hidden I/O is a bug, but they pay for that agreement in opposite ways.

Zero — capability injection, mutable, explicit check:

pub fun main(world: World) -> Void raises {
check world.out.write("hello from zero\n")
}

AILANG — capability via effect row, expression-oriented:

module examples/hello

import std/io (println)

export func main() -> () ! {IO} =
println("hello from ailang")

Same insight (effects can't sneak in), different mechanism:

  • Zero threads World as a value parameter you destructure
  • AILANG threads IO as a type-level effect row the compiler tracks and the runtime sandboxes

Side-by-side: error handling

Zero — algebraic-effects-lite with raises / check / rescue:

fun validate(ok: Bool) -> i32 raises { InvalidInput } {
if ok == false {
raise InvalidInput
}
return 42
}

fun run() -> Void raises { InvalidInput } {
check validate(true)
}

AILANG — Result[T, E] ADT with ? propagation:

type ValidationError = InvalidInput

func validate(ok: bool) -> Result[int, ValidationError] =
if ok
then Ok(42)
else Err(InvalidInput)

func run() -> Result[(), ValidationError] = {
let _ = validate(true)?;
Ok(())
}

Zero's design is closer to OCaml/Koka's effect handlers; AILANG's is closer to Rust's Result + ?. Both are explicit, both check exhaustively at compile time — the ergonomic taste differs.

What Zero has that AILANG doesn't

  1. Native binary compilation. zero build --emit exe --target linux-musl-x64 produces small standalone executables. AILANG bytecode-VM only — see project_codegen_strategic_decision.md for the deliberate trade-off.
  2. C FFI via extern c "header.h" as alias.
  3. Manual memory + borrow checking — for agents writing performance-sensitive systems code.
  4. Bounded compile-time evaluation with sandboxed const-eval (no filesystem, no network, no ambient env).
  5. zero fix --plan --json — the compiler proposes a structured patch in JSON the agent can apply. AILANG diagnostics are good but don't currently emit a repair plan as a first-class artifact.
  6. zero explain ERR_CODE / zero doctor --json / zero size --json — every command has a JSON mode designed for tool consumption.
  7. Modular bundled skills. zero skills serves seven focused prompts (zero-language, zero-agent, zero-diagnostics, zero-builds, zero-packages, zero-stdlib, zero-testing) bundled inside the compiler binary and version-matched to the installed version. An agent can load only the skill relevant to its current task instead of the whole language reference. AILANG's ailang prompt currently returns a single consolidated file — see the design doc for the proposed split.

What AILANG has that Zero doesn't

  1. LLM-native primitives. std/ai.call / callJson / callJsonSimple make calling models a typed effect, not a library decision. Zero is about building tools agents run; AILANG is about agents calling models.
  2. Row-polymorphic effects. Functions can be generic over their callees' effects (f<E>(x) -> y ! E), which Zero's closed raises { Set } can't express.
  3. Eval-driven language design. The evaluation harness runs benchmarks across multiple models and languages, treating "what stops agents from succeeding" as a first-class language-design signal.
  4. MCP server + agent messaging. ailang messages, ailang chains, MCP integration, and the Collaboration Hub make AILANG installable as a peer agent.
  5. Pattern matching with ADTs. Zero's enum and choice give tagged unions but the ergonomics aim at C-style switches; AILANG matches like Haskell/OCaml with exhaustiveness checking.
  6. Capability budgets and contracts. Capability budgets and contracts give pre-commitment guarantees Zero doesn't have.
  7. Concurrency. Zero has no documented concurrency primitives.

Where each language is better suited

If your agent needs to…Reach for
Generate a small native CLI toolZero
Write a parser, transformer, or DSLAILANG
Manipulate binary buffers / wire protocolsZero
Call an LLM and validate JSON outputAILANG
Interop with a C libraryZero
Compose effects across modulesAILANG
Ship a linux-musl-x64 binaryZero
Run inside a sandboxed REPL or eval loopAILANG

What we're watching

Zero is two days old. AILANG plans to track:

  1. Diagnostic schema. Does Zero's --json repair metadata stabilize into a format worth borrowing? See the design doc M-ZERO-LANGUAGE-LEARNINGS.
  2. zero fix --plan. A compiler-emitted patch plan is a strong primitive for the eval-fix loop.
  3. Adoption. If Vercel Labs scales Zero into Vercel's product surface, the systems-agent niche becomes well-defined and AILANG can confidently stop chasing it.
  4. Convergence. Capability objects, explicit effects, JSON diagnostics — the design space is narrowing. Worth a periodic re-comparison.

Eval-suite inclusion?

Yes in principle — but blocked in practice as of Zero v0.1.1.

The principled answer is yes, absolutely: AILANG's methodology already assumes models have minimal training exposure and learn the language from an in-context prompt (ailang prompt), and Zero ships the equivalent surface (zero skills get zero-language). Comparing AILANG-from-prompt vs Zero-from-prompt vs Python (memorized by every model) directly answers the question "does language-for-agents design actually move pass-rate?"

A hands-on smoke test against the released Zero v0.1.1 binary (17 May 2026) revealed concrete runtime blockers, however:

  1. The released binary's direct emit only supports trivial programs. Verbatim diagnostic: "restrict this program to exported no-parameter functions returning small integer literals." Programs with String parameters or locals fail to lower with CGEN004. balanced_parens type-checks but cannot run.
  2. The C bridge is deliberately removed"cBridge":{"policy":"removed","explicitDirectFallback":"never-c-bridge"}. Even with --cc clang (works for trivial hello), the lowerer rejects complex types before linking.
  3. No float / math stdlib. adt_option (calls safeSqrt) literally cannot be expressed.
  4. zero skills is served by a wrapper script in the source checkout, not the released binary.
  5. zero explain <CODE> doesn't recognize its own diagnostic codes at v0.1.1.

The eval-suite work is scoped in the design doc as Phase 3, gated on: Zero v0.2.0+ shipping zero run for non-trivial programs, OR a 6-month timeline check (November 2026). A constrained "check-only" pass measuring "fraction of LLM-generated Zero programs that type-check" is a meaningful optional intermediate signal (~3-4h to wire) — see the design doc for the implementation path.

The smoke test was still hugely valuable: it confirmed Zero's JSON diagnostic schema is genuinely best-in-class and worth directly studying for AILANG's Phase 1 diagnostic-schema-hardening work.


Last updated: 17 May 2026 (Zero v0.x, AILANG v0.20.0)