Strong typing

jdavidb on 2004-11-11T19:02:56

From O'Reilly's Javascript: The Definitive Guide, fourth edition:

JavaScript is obviously a simpler language for being untyped. The advantage of strongly typed languages such as C++ and Java is that they enforce rigorous programming practices, which makes it easier to write, maintain, and reuse long, complex programs. Since many JavaScript programs are shorter scripts, this rigor is not necessary and we benefit from the simpler syntax.

That's interesting. My language of choice for writing, maintaining, and especially reusing a long, complex program would be Perl, and it does not have strong typing. Many people I know would feel just as emphatically that a Lisp variant is the way to go and again, no strong typing. I'm sure strong typing has an advantage, as do the languages mentioned, but I'm not sure that this is necessarily one of them.


Lisp

Dom2 on 2004-11-11T21:52:22

Au contraire, lisp does have fairly strong typing, it's just not in your face. And you can make it laxer or turn it up as you desire.

Still, I think that the type inference systems that you get with ML, Haskell and so on are probably better.

-Dom