4 ms·
Most of the times, they don't. Static typing helps with catching certain types of errors long before the compiled code arrives in production but it's just one t
by BjoernKW 12y ago
Most of the times, they don't. Static typing helps with catching certain types of errors long before the compiled code arrives in production but it's just one tiny factor that contributes to overall software quality. Lack of expressiveness or lack of developer happiness can be much more detrimental to software quality than lack of static typing.
- xfalcox 12y agoI second this. I'm currently creating a new dynamic website, which will see around 10k users a day. We could have done it in a week with rails scaffolding capabilities and the vast gem environment, but we are doing everything manually in Scala, because type safety and performance. It's so frustrating that I'm looking forward to quit very soon.
- mercurial 12y agoThis is a weird complaint. The fact that Rails has scaffolding and whatever Scala framework your team uses doesn't has little to do with type safety (there are plenty of web frameworks in dynamic languages without scaffolding as well). There are several languages which require a comparable amount of typing to a dynamic program, while adding considerable type safety.
- scalesolved 12y agoThe Play! Framework http://www.playframework.com http://www.playframework.com has been pretty sweet for us so far and we use Java with it and that plays second fiddle to Scala users who really enjoy the full benefit of the framework.
- mod 12y agoI'd enjoy getting paid to go slow and learn Scala. I really despise the "let's finish this in one week" that is typically going on for me. I'd rather learn best practices, even if they're in a language, and have some experience building long-lasting services. Feels like the difference in working at a mobile home shop vs a custom log home company.
- jeletonskelly 12y agoExactly. Not to mention that in any large scale system your functional and integration tests are the most useful for producing high quality software than simply having static types.
- the_af 12y agoNo-one is arguing that you should just have static types and nothing else. The argument is that static types and testing are better than just testing. After all, static types are a kind of test that the compiler verifies for you, leaving you free to focus on the rest of the tests. I'd say in any large scale system, dynamic typing is a risk (though there are ways of mitigating this risk, of course).
- 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).
- lmm 12y ago> Static typing helps with catching certain types of errors long before the compiled code arrives in production but it's just one tiny factor that contributes to overall software quality. If you use them right, expressing the constraints of your system in the type system, you can improve huge areas of quality. It doesn't give you much for free, but it does give you a tool that lets you check your own correctness properties more efficiently and maintainably than any alternative. > Lack of expressiveness or lack of developer happiness can be much more detrimental to software quality than lack of static typing. Agreed - but good static typing makes a language more expressive, not less.