A language built for a model to write does not beat Rust today. We found that what mattered was a program that states what it means, and a compiler that says exactly what to change when something breaks.
Why we asked
Rust is the language you pick when you want memory safety and speed without a garbage collector. It is also a hard language for a model to write. Rust makes the author state ownership, lifetimes and trait bounds that most languages leave implicit. A person pays that cost once, while learning. A model pays it on every program, and every compiler refusal turns into a retry.
So would a language designed for the model to write, instead of for a person to read, cost less?
There is a popular claim that human language holds models back, and that they will drift toward dense notation nobody can read. We found little evidence for it, and the only first-hand account we found contradicts it. In Jason Hall’s experiment, a model designed its own intermediate language for token efficiency, starting with single-byte opcodes. Then Claude “decided that maintaining the unreadable character opcodes was tripping it up too, and switched to short English words.”1 That is one engineer and one blog post with no benchmark, so the evidence is weak.
We can’t prove or disprove the claim. We also used standard language models, trained largely on human-written text and code, so we are not in a position to draw conclusions about what a model built differently would prefer.
Where model-written Rust breaks
Published studies measure where model-written Rust fails. They disagree on the mix, because they measure different tasks:
- Contest-style problems. Of 12,942 Rust compile errors across 7 models, 43.4% were type or parameter mismatches, 20.5% missing imports and 16.7% ownership or lifetimes.2
- Repository-level translation. Compile errors were 92.3% of all failures. The top error codes were for methods and names that don’t exist, ahead of type mismatches.3
- C to safe Rust. The best four models solved 13% to 22% of tasks in a single attempt. Borrow errors ranged from 21% to 42% depending on the model.4
- Cryptographic code. Only 23.3% of 240 samples compiled, and invented APIs were the largest single cause of failure, at 41.3%.5
- Token cost. Rust used 1.16x to 1.57x the tokens of Python, and the authors put that down to retries and repair.6
The borrow checker features prominently in some of these studies and less in others. It showed up in 21% to 42% of C-to-Rust projects, and caused 16.7% of compile errors on contest problems.
Feeding compiler errors back to the model roughly doubled build success on C-to-Rust translation, from 35% to 68% for o3 and from 43% to 78% for Claude Opus 4. Passing tests moved much less: 31% and 29% with compiler feedback alone.4 A good compiler turns failures into programs that build. Getting them right still took tests.
The five languages
A catalogue at agentlanguages.dev listed 42 AI-native or agent languages when we checked.7 They fall into three camps: languages that change notation to suit models, languages that make a program’s claims checkable, and languages that script agents. The last camp coordinates models instead of being written by them, so we left it out.
We picked five:
- Rust. The baseline, and the subject of the question.
- Vera. The verification bet. Every function carries contracts, and a Z3-backed verifier tries to prove them before the program runs.8
- NERD. The token-density bet. Its site claims 50% to 70% fewer tokens, measured against JavaScript, TypeScript, Java and Python, never Rust, with no method given.9
- Lean. Verification without a new language. A mature, human-designed proof system.
- Go. Familiarity without verification. A mainstream language the model has seen a great deal of.
Lean and Go make the errors easier to explain. When a language catches a mistake, or the model makes fewer of them, there are three possible reasons: the language was designed for models, it verifies what the program claims, or the model has seen a lot of it. Lean has verification without being designed for models. Go has familiarity without verification. Comparing where the same mistakes surface in Lean and Go against Vera and NERD shows which of the three reasons a benefit came from.
How we measured
Every program implements the same task: Conway’s Game of Life on a 64 by 32 grid with dead edges, seeded with a 36-cell Gosper glider gun. Each was written from one specification that fixes the rules, the seed and the exact output bytes. A Python reference program produced the expected output, our single source of truth (SSOT), and that output is frozen. A program passes only if its bytes match.
Four measures came out of that setup:
- Rounds to green. A round is one run of the language’s check script: build, lint, run, compare against the SSOT. Ten rounds maximum.
- Feedback quality. Every compiler diagnostic was scored 1 to 3 on locality (does it point at the defect), clarity (does it say what is wrong) and actionability (does it say what to change). A failure caught only by the SSOT comparison, with nothing from the language, is recorded as silent.
- Catch stage. Ten kinds of mistake, F01 to F10, were planted one at a time into every program as a single edit. For each, we recorded the earliest stage that noticed: compile, lint, static verification, runtime, or only the SSOT comparison.
- Tokens. Whole files, comments included, counted with the
o200k_basetokenizer.
Every sentence of evidence in the underlying report carries a label, so you always know how much weight it can take:
measured: produced by a run that can be repeated.observed: seen once, or in reading code.cited: from a published source we read.self-reported: a project’s claim about itself.reasoned: an argument from the evidence.speculative: no evidence either way.
That last label got used more than I expected. Performance, for one, was never benchmarked, so nothing below says anything about speed.
One model did all of this. Claude wrote the five programs, ran them and scored its own compiler feedback. A second model, blind to the first scores, re-scored every diagnostic. They agreed exactly on 22 of 29 cells and were within a point on the rest. Neither rater is a person.
Results
Five programs
| Language | Rounds to green | Tokens vs Rust | First failure |
|---|---|---|---|
| Rust | 2 | 1.00x | rustfmt wanted an if laid out differently |
| Vera | 2 | 1.78x | an ensures clause written after effects |
| NERD | 4, strict check still fails | 5.05x | parser and code generator defects |
| Lean | 2 | 1.51x | a proof tactic couldn’t see through a let |
| Go | 1 | 0.84x | nothing |
Go finished first and cheapest. That says more about familiarity than about Go. Life is almost certainly in the training data for Rust, Lean and Go, and almost certainly not for Vera or NERD. Go’s compiler never complained, so its Life run tells us nothing about its feedback.
Rust’s one failure was a formatter. rustfmt printed the exact replacement text, cargo fmt
applied it, done. A perfect feedback score on a layout complaint doesn’t say much about how
rustc explains a borrow error. An earlier example in the project shows that better. A generic
comparison was missing a trait bound:
error[E0369]: binary operation `>` cannot be applied to type `&T` --> rust-wins/main.rs:8:18 |8 | if value > max { | ----- ^ --- &T | | | &T |help: consider restricting type parameter `T` with trait `PartialOrd` |5 | fn peak_reading<T: std::cmp::PartialOrd>(series: &[T]) -> &T { | ++++++++++++++++++++++Immediate, local, and it carries its own repair.
Vera’s first failure was a clause in the wrong order, and the compiler named both the cause and the fix. Then the verifier produced 56 obligations. Z3 proved 36 statically and compiled the other 20 into runtime guards. The neighbour count bound and the index bounds were settled before the program ever ran:
private fn neighbours(@Array<Int>, @Int, @Int -> @Int) requires(array_length(@Array<Int>.0) == 2048) ensures(@Int.result >= 0 && @Int.result <= 8) effects(pure){ cell_at(@Array<Int>.0, @Int.1 - 1, @Int.0 - 1) + cell_at(@Array<Int>.0, @Int.1, @Int.0 - 1) + cell_at(@Array<Int>.0, @Int.1 + 1, @Int.0 - 1) + cell_at(@Array<Int>.0, @Int.1 - 1, @Int.0) + cell_at(@Array<Int>.0, @Int.1 + 1, @Int.0) + cell_at(@Array<Int>.0, @Int.1 - 1, @Int.0 + 1) + cell_at(@Array<Int>.0, @Int.1, @Int.0 + 1) + cell_at(@Array<Int>.0, @Int.1 + 1, @Int.0 + 1)}Rust left those same properties to tests and runtime checks. That is the one place a new
language bought something Rust doesn’t have. It cost a program 1.78x the size, a lot of
documentation to read first, and the positional @Int.0 / @Int.1 notation that you have to
count by hand, I mean token.
NERD needed four rounds and none of them had anything to do with Life. The parser rejected
list syntax that its own documentation describes but the code generator never implemented. A
parser trap exited with code 133 and no message, silently truncating a multi-line if. Clang
rejected the generated IR with “Instruction does not dominate all uses”. And finally, the
specified output layout turned out to be impossible to write, because NERD’s out always
appends a newline. With whitespace stripped, the cells are correct. Byte for byte, it fails.
NERD’s 5.05x token count also comes with a warning: part of the file was produced by a
generator script, so the count reflects that script’s output.
Lean proved two theorems with no sorry: the neighbour count is at most 8, and a step
preserves the grid size. Both hold by construction and carry hypotheses they never use. Real
proofs, small ones. The published gap between writing Lean code and writing Lean proofs (72.6%
against 4.9% for the best model on VERINA10) wasn’t tested by proofs this easy.
Ten planted bugs
| Planted bug | Rust | Vera | NERD | Lean | Go |
|---|---|---|---|---|---|
| F01 off-by-one bounds | runtime | runtime | failed | masked | runtime |
| F02 wrong rule constant | failed | failed | failed | failed | failed |
| F03 swapped row and column | failed | failed | failed | failed | failed |
| F04 type confusion | compile | compile | failed | compile | compile |
| F05 missing branch | failed | failed | failed | failed | failed |
| F06 in-place aliasing | failed | n/e | failed | excluded | failed |
| F07 wrong shape | runtime | runtime | failed | static | compile |
| F08 contract breach | n/e | static | n/e | static | n/e |
| F09 hallucinated API | compile | compile | failed | compile | compile |
| F10 integer overflow | runtime | static | n/e | failed | failed |
failed means the program ran and produced the wrong output, and only the SSOT comparison
noticed. n/e means the mistake can’t be expressed in that language. Lean’s F01 is masked
because an out-of-range read returns a dead cell and the SSOT input never reaches that edge.
Lean’s F06 broke a proof for an unrelated reason, so it doesn’t count. Rust’s F10 panic is in
the debug profile only.
Caught by the language itself, at compile, lint or static verification:
- Rust: 2 of 10
- Vera: 4 of 10
- NERD: 0 of 10
- Lean: 4 of 10
- Go: 3 of 10
Three rows are silent in every language. A wrong rule constant, swapped coordinates and a missing branch sailed through every type system, contract, proof and linter we had. These are mistakes in the rules of Life, and nobody wrote the rules of Life down anywhere a machine could check them. The only thing that knew was the SSOT.
Everything else got caught by whatever had been stated. Type and API slips died at compile time
in Rust, Vera, Lean and Go. The contract breach died statically in Vera and Lean, because a
contract said it couldn’t happen. Wrong shape split four ways depending on whether the grid
dimensions lived in a type (Go’s [32][64]bool), a theorem (Lean), or nowhere until runtime.
Diagnostics also had a common weakness. Actionability was the lowest of the three scores in every language. Compilers are good at pointing at the line and much worse at saying what to do about it.
What the model actually got wrong
The seven real first-attempt failures, the ones that happened while the model was writing the code, matched none of the ten bugs we planted. They were a formatter layout, a clause in the wrong order, NERD’s parser and backend defects, and a proof tactic.
We ran a second, small batch: 21 fresh attempts at single Life functions. Fourteen passed cleanly. Seven failed, all at a language stage: four Rust formatter layouts, two Lean proof steps, one NERD backend defect. None reached the SSOT comparison. All seven were friction, and the behaviour was correct.
So I built a careful taxonomy of the mistakes I expected, and the model made different ones. Rule-level slips still happen; a single small program is too small to show how often.
What it means
Principle: A compiler can only check what you told it.
- A language catches what its types and contracts state, and nothing else. The rule-level bugs were silent everywhere. No syntax fixes that. Someone has to write the rule down.
- The AI-native languages didn’t win on their own terms. Vera’s programs were longer than Rust’s on every comparison. The documentation a Vera program cites costs about 20,000 tokens to put in context, against about 9,000 for Rust, and a model that already knows Rust needs little of that. NERD’s savings were not reproduced, and its Life program cost more than Rust’s.
- NERD’s failures came from its toolchain. Missing features, a silent parser trap, a compiler that printed errors and exited 0. A young toolchain hasn’t had time to find those, and each one costs a round.
- Vera is the exception because of its verification. Its contracts moved real checks to before the program ran. That’s the argument for an AI-native design, and it’s also an argument Lean makes without being new.
- Feedback beats syntax. The published repair loop doubled build success. rustc prints the fix. A language whose diagnostics don’t is paying for it in retries.
- Rust’s lead is age. 353,683 crates on the day we checked, and far more training data than any language born this year. A new language can only buy that back with time, or with its documentation in every prompt.
What this can’t show
- One model. Claude wrote everything and scored its own feedback. Another model would make a different mix of mistakes.
- One run. Every program and every planted bug ran once. These are reference points, not rates.
- One small, familiar program. Life favours the languages that have seen it.
- No human rater. Two models agreeing is weaker evidence than one person agreeing.
- Young toolchains move fast. Vera 0.2.3 shipped the day before we finished, against programs written for 0.2.2.
Four results would change the verdict:
- A multi-model, multi-run study on larger programs the models haven’t seen.
- An AI-native toolchain whose diagnostics match rustc’s on type and ownership errors.
- Models that, left alone, write contracts for rule-level properties.
- Human raters in place of model ones.
Nobody wrote down the rules of Life in this experiment, and the SSOT was the only one that noticed. While many of the problems result from missing requirements, this is the nature of software development, even when humans write the code. The cost-benefit of retries to improve quality is where we should be headed. Vera’s approach of embedding mandatory contracts feels like the right one, and the cost of retrying until the compiler is happy is a good investment. I’m looking forward to seeing it evolve into a stable language that the models know.
Footnotes
-
Jason Hall, personal blog post, articles.imjasonh.com, 2026-01-11. ↩
-
Nogueira et al., “Unreliable in Practice?”, ISSRE 2026, arXiv 2608.00661, Table VI. ↩
-
RustRepoTrans, arXiv 2411.13990v6, Tables IV and V. ↩
-
Elsayed, Fulton and Yang, EASE 2026, arXiv 2604.27001. ↩
-
“The Best Programming Language for Tokenmaxxing”, arXiv 2607.22807v1. Four of five models significant; Gemma’s 1.07x was not. ↩
-
agentlanguages.dev, retrieved 2026-10-16. An independent catalogue. ↩
-
github.com/aallan/vera. Programs written against 0.2.2. ↩
-
nerd-lang.org. Programs written against v0.1.4; no repository activity since January 2026. ↩
-
VERINA, Ye et al., arXiv 2505.23135v3. o3, one trial per task. ↩