4 ms·
“The data indicates functional languages are better than procedural languages; it suggests that strong typing is better than weak typing; that static typing is
by jdonaldson 10y ago
“The data indicates functional languages are better than procedural languages; it suggests that strong typing is better than weak typing; that static typing is better than dynamic; and that managed memory usage is better than unmanaged.”
Now that’s more like it! Except:
“While these relationships are statistically significant, the effects are quite small.” [Emphasis added.]
In fact, I’m not aware of any empirical evidence that static types have a strong impact on bug density.
Absence of proof is not proof of absence. There are multiple confounding factors when comparing languages in this fashion. (To name at least one, consider the big difference in use cases and applications with javascript vs. C). Even with confounding factors, static typing still has an edge in the analysis.
It's disappointing to see folks fall into traps of confirmation bias. Nobody is saying that dynamic languages don't have their place. It's fine if dynamic languages and their domains are all that someone cares about. However, don't assume for a second that learning a statically typed language is a waste of time. In fact, I would argue that it lets the individual tackle much more complex projects. One side effect of this possibility is that the individual will cause more complex bugs that can't be detected through static type analysis. This isn't a negative though, it's just the new reality.