by kbanman · 10y ago · 0 comments
In a statically typed language (the stronger the better), aided by a good IDE, I don't need to be constantly executing my code against data during development; My editor is constantly validating my code, and when it stops complaining, my code will work. And months later when I or someone else uses that code in another part of the system, they won't need to execute that code to see how it behaves, as the types themselves provide documentation and as-you-code feedback.
You mean your code will compile and run. Whether it behaves as desired is completely unknown without testing.
[Edit] To be fair, this is not only, and even perhaps not so much, due to the static typing per se but also due to the mental discipline the particular programming language may require from the programmer even to write code that can be successfully compiled.
I'll bet my Python code has a similar probability of working correctly on the first run, conditioned on the complexity of the task.
'course, it probably wouldn't work fast, and it was 50/50 whether I'd introduced space leaks, but...
Having developed professionally in both Python and Haskell, the probability for me was significantly higher in Haskell.
Indeed, difference in complexity is the key here.