3 ms·
> Lack of expressiveness or lack of developer happiness can be much more detrimental to software quality than lack of static typing. Except 5 years later, when
by mercurial 12y ago
> Lack of expressiveness or lack of developer happiness can be much more detrimental to software quality than lack of static typing.
Except 5 years later, when the happy developers have gone on to express themselves elsewhere, and left behind them a mess. Now, you can make a mess in any language, but a mess in a dynamic language is considerably harder to refactor.
I also dispute the claim that a strong type system is a "tiny factor" in code quality. Being able to express invariants with types makes code much robust, and self-documenting.
- liviu- 12y ago>I also dispute the claim that a strong type system is a "tiny factor" in code quality. There actually are some studies that show that using a static typing system is only a tiny factor when it comes to code quality: http://wadler.blogspot.co.uk/2011/09/experiment-about-static-and-dynamic.html http://wadler.blogspot.co.uk/2011/09/experiment-about-static... However, I've also read studies that show the opposite, but the lack of rigurosity and the possible confounds that show up for both sides seems to render this as an open question.
- calibraxis 12y agoWith Clojure, you can begin to compare static vs. dynamic typing — keeping the language the same.
- Glide 12y agoA language having static or dynamic typing is only a part of the puzzle. Having tools that let you understand a codebase better through static typing is more important. With a statically typed language you have the compiler as a baseline, but it enables IDEs to do far more powerful things.
- mercurial 12y ago> However, I've also read studies that show the opposite, but the lack of rigurosity and the possible confounds that show up for both sides seems to render this as an open question. This doesn't look particularly convincing, indeed (though studies about programming languages rarely are).
- rdtsc 12y agoSounds like you've had a bad experience. Hopefully they had tests. And unless they've mathematically proved the code always does what it expects (I've only seen that in avionics systems). Also depends on application of course. Large concurrent and distributed applications benefit a bit less from static typing in traditional languages. Or rather, they are so hard, that type error are not as much of a significance. How concurrency, communication and failure is handled is more critical. But say a game or a large desktop application with millions of lines of code, could get a larger benefit from static type checking, no doubt. Now for a bit of personal experience. I have programmed in Java, C#, Python, Erlang, C++. I have found that when working with large or unknown code bases C# for example is great. Just having the IDE and generics support in C# during compile time is awesome. But if I program something from scratch, I can make a lot faster progress in Python. I often put more work into both unit tests and integration tests because I just have more time available. Also failures during run-time, even in Python, in my systems a very rarely type errors (those are caught pretty early one). But they are often logic or concurrency errors.