hn.today

Type errors cost our coding agents under 1% of their time

evilmartians.com5 points0 comments
Screenshot of Type errors cost our coding agents under 1% of their time

The central claim is that static typing is often assumed to give coding agents a useful error-checking feedback loop, but measured results do not show that it helps them finish more work. Across real issue-fixing benchmarks in ten languages, typed and dynamic languages each solve about 65% of tasks after adjusting for task difficulty; Python reaches 67%. Differences between individual languages are larger than the gap between typed and dynamic groups. TypeScript also fails to outperform plain JavaScript in three benchmarks after tasks are relabeled according to the code actually changed. The labels often misrepresent the fix: 472 of 823 JavaScript- and TypeScript-tagged tasks edit the other kind of code, and the task sets differ in difficulty.

The experiments also examine how agents use type tools. In public benchmark runs, agents invoked TypeScript’s compiler in only one run out of ten. Adding a language-server plugin did not reliably deliver errors, partly because agents edited through shell commands; forcing edits through supported tools exposed errors but did not improve task success. In separate Ruby experiments, type errors took agents less than 1% of their time, while requiring Sorbet or RBS type checks consumed 20-28% without increasing success: typed setups solved 57-61% of tasks, compared with 58% for plain Ruby. The evidence challenges the idea that type checking automatically benefits agents, while distinguishing that claim from the broader value of types to human developers or software quality.

Read on evilmartians.com0 comments on Hacker News

Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.

More in AI

The daily digest

Today's best Hacker News stories, summarized and screenshotted, one email a day.