4 ms·
If you can, choose a statically typed language over a dynamically typed one. Reason: more errors are caught earlier during development. The rest of the article
by kluck 12y ago
If you can, choose a statically typed language over a dynamically typed one. Reason: more errors are caught earlier during development. The rest of the article is (in my opinion) really just pro-scala talk.
- m0skit0 12y agoThat's oversimplifying. There are much more things to take into account than just that. If it was that simple, there would be no dynamic/weak typed language, right?
- kluck 12y agoIts a fact: Using a dynamically typed language you have to write more code (tests etc.) to achieve the situation where you catch the same kind of bugs that a statically typed language would inform you during analysis. Strong and weak typing is a different thing. And I agree, it is not that simple, but only if you take other factors into account.
- m0skit0 12y agoWhy wouldn't you take other factors into account? Or better, why would you take this factor in particular as the only factor that matters?
- kluck 12y agoFor me that is the most important factor, because it directly influences the amount of code produced. Less code means less bugs and less code to read/understand when getting back into a codebase.
- m0skit0 11y agoThen I guess you chose the wrong side. Dynamically-typed languages produce less code precisely because you don't need to specify the types. E.g. Scala is more verbose than Clojure.
- justthistime_ 11y agoI'm not sure that Scala code + types is more verbose than Clojure code + tests. (Which is what the OP argued.)
- m0skit0 11y agoYou need tests everywhere, statically typed doesn't mean you don't need to test.