3 ms·
Regarding bugs, I think it's clear that static typing does detect more errors - the issue is whether it's worth the trouble. I think a more significant differe
by 6ren 14y ago
Regarding bugs, I think it's clear that static typing does detect more errors - the issue is whether it's worth the trouble.
I think a more significant difference is the inertia of the codebase, how difficult it is to change. Static types make it harder to evolve interfaces; but unit tests make it even harder.
But both the above are just fiddling: the real advantage of static typing is runtime speed; the advantage of dynamic types is development productivity. In the history of programming, the latter always wins.
- Peaker 14y ago> But both the above are just fiddling: the real advantage of static typing is runtime speed; the advantage of dynamic types is development productivity. In the history of programming, the latter always wins Have you used Haskell? Speed is just a (nice) bonus. Type safety is not about speed at all. And I am much more productive in Haskell than I could be in a dynamically typed language. I can turn the code base inside out, and trust the type system to guide me to everywhere that needs to be fixed. When I compile it, it almost always works. I barely have to test anything.