Dan Luu’s token analysis across programming languages asks a question most teams shipping with coding agents haven’t weighed: your language choice changes how much you pay per AI-assisted edit.
The mechanic is straightforward. LLMs process code as tokens. Verbose languages produce more tokens per unit of logic, which means higher API costs, slower generation, and more context window pressure during agentic edits.
What the analysis examines:
- Syntax density — how Python and Go express the same logic in fewer tokens than Java or C++
- Boilerplate tax — Java’s class wrappers, type annotations, and accessor patterns inflate token counts
- Context budget — verbose languages consume context faster, leaving less room for agents to see surrounding code
- Training data coverage — languages with more public code (Python, JavaScript) get better model familiarity, partially offsetting token costs
NOTE
Peter Steinberger made a parallel argument on Lex Fridman’s podcast: “there’s no single answer” — pick the language with the right ecosystem for your problem domain, and accept that agents handle the reading overhead.
Matt Asay’s LinkedIn take cuts sharper: “the one you already know” is the right language for building agents, because delivering value matters more than token optimization.
For teams choosing a stack with coding agents in mind: token density is a real tiebreaker between roughly equal options — but it doesn’t override ecosystem fit or team fluency.