A widely-cited claim suggests that dynamic, concise languages like Clojure and J are more "token-efficient" for AI coding agents — requiring fewer tokens to express the same logic. The implication: if token cost is the bottleneck for AI-assisted development, we should all be writing in the most token-dense languages.

But a new analysis by Dan Luu shows this claim falls apart under scrutiny.

The Token Efficiency Hypothesis

The original claim goes like this: LLMs process code as tokens, and some languages express the same logic in fewer tokens than others. A dynamically typed language like Python omits type declarations, making code more compact. An array language like J can express complex operations in a fraction of the tokens needed in C or Java.

One widely-cited comparison found a 2.6x gap between C (the least token-efficient) and Clojure (the most efficient). J was even more extreme at just 70 tokens average, nearly half of Clojure's 109.