4 ms·
Sorry to be pedantic, but I just have to point this out, since the mistake is made over and over again in this thread: It's not about strongly vs weakly typed
by pmoriarty 10y ago
Sorry to be pedantic, but I just have to point this out, since the mistake is made over and over again in this thread:
It's not about strongly vs weakly typed languages, but statically vs dynamically typed languages.
OCaml is statically typed. Javascript and Python are dynamically typed.
What you are talking about are benefits of statically typed languages.
For more information, please see:
http://blogs.perl.org/users/ovid/2010/08/what-to-know-before-debating-type-systems.html http://blogs.perl.org/users/ovid/2010/08/what-to-know-before...
- ska 10y agoIt is good to maintain an understanding about the difference. On the other hand, many of the most egregious problems are due to weak typing and not as static advocates, well, advocate, static vs. dynamic. Having a really good type inference engine helps make statically typed languages much more productive - but lisps and the like have real advantages too.
- saosebastiao 10y agoProbably more accurate to say strong AND static typing. There are plenty of languages that are statically typed but have very weak type enforcement in the compiler and where idiomatic usage tends to use Any types and reflection and non-hygienic macros and many other type shenanigans, allowing tons of bugs to seep through. OCaml is not one of these languages.
- wtetzner 10y agoWell, if we're really going to be pedantic, then it's about typed vs untyped languages[1]. [1] http://stackoverflow.com/a/9166519 http://stackoverflow.com/a/9166519