What's the best programming language for coding agents?
TL;DR Highlight
Re-testing the claim that dynamic languages save tokens on larger tasks showed it doesn't hold up
Who Should Read
A backend developer choosing a language for coding-agent work based on token cost
Core Mechanics
- Easy-problem results don't generalize
- The post claiming dynamic languages use 1/2 to 1/3 the tokens is based on trivial Rosetta Code problems.
- J averaged 70 tokens versus 109 for Clojure, and C versus Clojure was a 2.6x gap.
- As with caveman mode, such big gaps vanish on larger problems.
- A zstd decoder eval re-tested it
- Agents got only the RFC and had to implement a complete zstd decoder without tests.
- Runs used GPT-5.6 Sol at medium and ultra effort.
- At medium, dynamic languages looked better on cost versus score.
- At ultra, results were mixed and a couple of static languages did best.
- Weird-language supremacy didn't appear
- Obscure languages and assembly scored poorly.
- More popular languages had weak-to-moderate correlation with higher correctness and lower cost.
- The author says mainstream languages are the safer bet for ordinary users.
- A Pandoc task gave the same picture
- Agents got ProgramBench materials plus tests and were scored on holdout tests.
- Success and cost had no strong relationship to static, dynamic, or dense.
- Clojure did much better than on zstd and assembly did much worse.
- Score gaps came from idiosyncratic failures
- In zstd, 36/40 medium and 5/40 ultra Clojure programs failed because byte conversion throws on 128–255.
- Cargo was repeatedly invoked with wrong arguments, which wastes time unless codex is told how to call it.
- The compared benchmark had bugs
- ai-coding-lang-bench ran a nonexistent ../../minigit path in one test.
- One agent symlinked that path to its own executable, contaminating later tests.
- Rust's failures came from this path problem, not language difficulty.
Community Reactions
- Experience that Go works well with LLMs
- One commenter found one dominant way to write things, consistent training data, and fast compile and lint cycles meant fewer correction requests.
- They said LLMs default to Python and must be repeatedly told to use Go.
- Opinion that MirrorCode also found small language gaps
- It compared Python, C, Rust, Go, OCaml, and Ada on 19 long tasks with little difference in solve rates.
- Successful Ada solutions used about 25% more tokens than average.
- Opinion that token efficiency misses whole-session cost
- Most tokens are spent outside code output, so a token-efficient language can be worse overall.
- TOON reportedly was a wash across whole sessions.
- Opinion that verifiable structure matters more than language
- Components with verifiable contracts make code easier for LLMs regardless of language.
- Another commenter suggested splitting by Python, Go, and TypeScript to keep logic from blurring across layers.
How to Apply
- Write exact build and test commands into agent instructions
- Today, add exact calls like cargo or go test to AGENTS.md or CLAUDE.md.
- Cut the time and tokens wasted on repeated wrong-argument calls.
- Run 2-3 real tasks before picking a language
- Run each candidate language on non-trivial tasks of your own under identical conditions.
- Record correctness, cost, and time together.
- Compare obscure languages against mainstream ones first
- Before adopting an unusual dense language, run the same task in a mainstream language.
- Prefer languages your team can read and review.
Try It
# Paste into Claude Code or ChatGPT (simplified version of the post's method)
You are a coding agent. Implement the task below in both {{language A}} and {{language B}}.
Task: {{task description, non-trivial}}
For each language, report in a table:
1) Whether tests pass
2) Number of fixes needed for compile/runtime errors
3) Approximate code length
4) Where you got stuck
At the end, state the conclusion applies to this one task only and do not generalize.
Next to try: swap in another task and repeat the comparison.Terminology
Related Papers
Gemini 4 Neon is the new #1 on the Models Engineering Index
Gemini 4 Neon ranks first on the Models Engineering Index with 68.0, combining multiple benchmarks.
LLMs can read and write executables byte by byte from a hex dump
Given only a hex dump and no tools, an LLM analyzed, patched and wrote working executables.
Claude was trained on protein sequences at scale
Next-amino-acid tests on obscure proteins show only the latest Claude models predict them
Remembered as Brief: Stored Preferences SilentlyRemove Decision-Critical Information
A stored 'keep it short' preference silently drops warnings; listing must-know points first restores content.
All AI-generated code should be Open Source
A blog argues AI-generated code should be open source; most HN commenters disagreed.
What thousands of conversations look like inside a language model
Mapping Qwen3-1.7B states showed Chinese sitting apart from English, while German and Croatian overlapped it.
AI, activity, and outcomes in software engineering
AI sped up writing code, but shipping speed did not rise as much, says a talk
LLMs Play Zachtronics' TIS-100
16 LLMs played TIS-100 and set 133 new Pareto frontier points across 18 puzzles