Hacker News new | ask | show | jobs
by tikhonj 899 days ago
> Static typing does not reduce logic bugs.

This seems like a strong statement to make based on the research. What I've seen falls into several camps:

- research that made some conclusion about logic bugs for complete beginners on small assignments, with languages that have bad type systems

- research that had significant limitations making it impossible to generalize

- research that failed to demonstrate that static typing reduced bugs—which is very different from demonstrating that it didn't!

I haven't done a super thorough review of the literature or anything, but I have looked through a decent number of software engineering papers on the subject. The only strong conclusion I got from the research is that we can't get strong conclusions on the subject through purely empirical means.

Hell, the whole question is meaningless. "Static typing" is not one thing—there's way more difference between Java and Haskell than between Java and Python, even though both Java and Haskell are statically typed and Python isn't. (This is even assuming you completely ignore Python's type annotations and gradual typing!)