How Vow compares

Vow is a small, young language with one unusual goal: to be easy for a language model to write correctly, and easy for a person to trust afterwards. This page compares it with languages you probably know, credits the languages its ideas come from, and is plain about what is actually new.

The short version: almost every ingredient of Vow exists somewhere else. What is unusual is the combination, and the reason for it.

At a glance

VowPythonTypeScriptGoRustCDafny
Index out of boundsproved impossible at compile timeruntime IndexErrorreturns undefinedruntime panicruntime panicundefined behaviourproved impossible
Nullnone; OptionNone anywheretracked with strictNullChecksnilnone; OptionNULLonly in nullable types
Contracts (requires/ensures)proved by Z3, always onruntime assert onlynonenonenone built inruntime assert onlyproved
Loop invariantsprovednonenonenonenonenoneproved
Terminationproved where a measure is givennononononoproved by default
Side effects in signaturesuses console, fs, proc, checkednononononoheap frames; no I/O effects
Operator precedencenone: mixing needs parenthesesyesyesyes (5 levels)yesyes (15 levels)yes
Argument passingnamed, except one-parameter callspositional or keywordpositionalpositionalpositionalpositionalmostly positional
Mutationvalues are immutable; var and inout, no aliasingshared referencesshared referencesshared referencesownership and borrowingraw pointersheap with modifies clauses
Memory managementreference counting, in-place updates when unsharedreference counting and GCGCGCownershipmanualGC
Genericsyes; verified once for all types, compiled per typeduck typingyesyesyesnoyes
Compiles toCbytecodeJavaScriptnativenativenativeC#, Java, JS, Go, Python, ...
Maturityexperimentalvery maturevery maturematurematurevery maturemature, used in industry

What is unusual about Vow

It is designed for machine authors

Languages are usually designed for people. Vow's rules were chosen for the mistakes a language model makes:

The documentation is part of the design. Vow for LLMs is written for a model to read once before writing Vow. As a test, another model (OpenAI Codex) wrote a 545-line static site generator, the tool that builds this website, from the documentation alone. It reports no parse, type or verification errors along the way (its report). That is one data point, not a study.

Proofs are on by default, without a proof language

In Vow, contracts, refinement types, loop invariants, index bounds and division by zero are checked by the Z3 solver every time you compile. There is no separate proof mode, and no lemmas, ghost code or tactics to learn. If it compiles, the contracts hold.

Dafny does this too, and does more: it has lemmas, ghost code, generics, termination by default, and years of industrial use. Vow trades that power for a smaller language that a model can use correctly on the first attempt. Some properties that Dafny can prove, Vow cannot even state yet.

Effects are a short list in the signature

A function is pure unless it declares uses console, uses fs or uses proc, and callers must declare everything their callees use. So "can this parser touch the file system?" is answered by reading one line.

Koka, F* and Haskell track effects far more expressively, with effect types, handlers or monads. Vow's version is deliberately blunt: three named capabilities, no type-level machinery, nothing to learn beyond the word uses.

Holes show what the verifier knows

Write ?name where an expression should go, and the compiler reports the expected type, the variables in scope and every fact known at that point:

hole: ?upper needs a value of type Int
    in scope: x: Int, lo: Int, hi: Int
    known facts: lo <= hi; not (x < lo); x > hi

Agda, Idris and Lean show goals and hypotheses at holes when you write proofs. Vow brings the same idea to everyday imperative code, where the "hypotheses" are the branch conditions and invariants on the path to the hole.

Proofs are content-addressed

A function's proof is cached under a hash of its body plus the contracts (not the bodies) of everything it calls. Rewrite a function's body without changing its signature, and none of its callers are re-verified. Unison identifies code by content hash; Vow does the same for proofs.

The compiler verifies itself

Vow's compiler is about 6,000 lines of Vow. It verifies itself: every index, slice and refinement in it is proved, its text utilities have functional specifications, and its lexer is proved to terminate on every input. It uses no runtime-checked escape hatches. It also reaches a fixpoint: compiled by itself, it produces byte-identical C.

This proves memory safety and the stated contracts, not that the compiler is correct end to end. CompCert, a C compiler proved correct in Coq, is in a different league.

Performance

We timed six programs from the Computer Language Benchmarks Game, written as the same straightforward, single-threaded algorithm in every language (the Game's fastest entries use SIMD and multiple threads, which would measure tuning rather than languages). Every output was checked against C's. Times are the best of three runs on an Apple M1 Pro; memory is the peak footprint.

BenchmarkVowCRustGoJavaScriptPython
binary-trees, depth 18 (allocation)0.95 s, 49 MB1.13 s, 17 MB1.20 s, 17 MB1.57 s, 43 MB0.60 s, 431 MB5.53 s, 38 MB
fannkuch-redux, n = 10 (array updates)0.24 s, 1 MB0.18 s, 1 MB0.19 s, 1 MB0.17 s, 2 MB0.23 s, 13 MB4.45 s, 6 MB
k-nucleotide, 500k bases (hash maps)0.18 s, 25 MB0.06 s, 18 MB0.10 s, 15 MB0.11 s, 31 MB0.31 s, 69 MB0.50 s, 23 MB
n-body, 5M steps (floating point)0.45 s, 1 MB0.27 s, 1 MB0.15 s, 1 MB0.25 s, 2 MB0.37 s, 15 MB22.6 s, 6 MB
spectral-norm, n = 2000 (floating-point loops)0.25 s, 1 MB0.16 s, 1 MB0.16 s, 1 MB0.16 s, 3 MB0.39 s, 15 MB20.6 s, 6 MB
mandelbrot, 2000 x 2000 (floating point, binary output)0.25 s, 2 MB0.25 s, 1 MB0.24 s, 2 MB0.24 s, 2 MB0.27 s, 15 MB25.6 s, 6 MB

Full results, toolchain versions and the programs are in the benchmark results; bench/run.py reproduces them.

What the numbers say:

The in-place updates follow the approach of Koka's Perceus, Lean 4 and Swift's copy-on-write. Before them (Vow 0.1, which never freed memory), fannkuch-redux took 4.34 s and 19.7 GB.

Where Vow's ideas come from

IdeaWhere it comes from
Contracts proved by an SMT solverDafny, SPARK Ada, Why3
Refinement types (Int where it >= 0)Liquid Haskell, F*
Effects in function signaturesKoka, F*, Haskell
No operator precedence, mixing needs parenthesesPony
Labelled block ends (end if, end name)Ada, Fortran
Mutable value semantics, inoutSwift, Hylo
Typed holesAgda, Idris, Haskell, Lean
Content addressingUnison
Compiling to C, bootstrapping from a C seedNim, Zig and many others

When not to use Vow

Today, for most things. Vow v0 is an experiment:

Use Python or TypeScript for breadth, Go or Rust for production systems, and Dafny or SPARK when you need machine-checked proofs today. Use Vow to explore what a language designed for model authors could be, or for small, self-contained tools where a proof is worth more than a library. See the roadmap for what V1 needs.