Two publications present opposing theses about the role of type systems in the era of AI assistants: an article on yyhh.org claims that AI code generation devalues static typing, while a GitHub report insists that types have become a critical safety net for code written by non-humans.


What happened
The author of the article on yyhh.org presents the thesis: AI models instantly fix compilation errors, which were previously the main argument in favor of statically typed languages. At the same time, type systems do not catch expensive semantic errors — incorrect business logic and missed edge cases. In support of this, Martin Alderson's research is cited: dynamic languages like Clojure require an average of 109 tokens per task, while static ones — 280 or more, giving a 2.6x difference in token efficiency. On the other hand, Cassidy Williams in an article on GitHub Blog (January 2026) claims the opposite: 94% of errors in code generation are related to types, and TypeScript maintains its position as the number one language on GitHub.
Context
The two publications measure different things and therefore do not directly contradict each other. Alderson's research evaluates the token cost of generation — how many tokens a model spends to solve a task. Cassidy Williams' GitHub statistics evaluate the frequency of errors — what proportion of problems with generated code are type failures. The thesis that AI "instantly fixes" compilation errors is technically simplified: fixing a type error in a context of 128K+ tokens requires additional round-trips, which increases the latency and cost of generation. TypeScript maintains its leadership on GitHub, and Python remains dominant in machine learning — both ecosystems are not shifting yet.
Why this matters for the industry
The discussion determines the direction of development of languages and frameworks. If static types are truly devalued as a quality control tool, this stimulates the development of more concise languages for new projects. If types remain a critical safety net — this strengthens the positions of Rust, TypeScript, Go and pushes tools like Cursor and Copilot to integrate type checking as a mandatory validation layer in the generation pipeline. The emergence of eval frameworks for evaluating the type correctness of generated code and intermediary products that automatically add type annotations to dynamic AI code is expected.
Why this matters for users
Choosing a stack for projects with active use of AI assistants now requires considering a new tradeoff: dynamic languages provide up to 60% savings on generation tokens, but require more thorough testing, as the vast majority of generation errors are type failures. When working with static languages, inference cost is higher, but the type system catches errors before deployment. For new product development, this means a practical choice between token savings and guaranteed type safety.
What is still unknown / limitations
Martin Alderson's research on token efficiency does not publish the evaluation methodology, task sample, and reproducibility metrics. GitHub statistics on 94% type errors in generation require independent verification — it is unclear how exactly the errors were classified, what is the proportion of false positives of the detector, and on which models the measurement was conducted. Both studies operate with non-representative samples.
Sources
- AI Coding Has Erased the Supposed Advantage of Statically Typed Languages — yyhh.org
- Why AI is pushing developers toward typed languages — GitHub Blog
- Which programming languages are most token-efficient? — Martin Alderson
Author
Look at AI, editorial team
