News for hackers. Stuff that matters.
Re:Why I don’t like Dynamic Typing by akkartik on Saturday February 25, 2012 @01:41PM (#3633520)
"The omission of variable declarations has nothing to do with dynamic typing."

I was inclined to say this as well when I was critiquing the first point (http://news.ycombinator.com/item?id=3633351). But on further thought, just about the only dynamic language that flags assignment to a typo'd variable name is scheme[1]. So it seems like a significant correlation.

[1] Not common lisp. Does clojure?

Re:Why I don’t like Dynamic Typing by tikhonj on Saturday February 25, 2012 @02:46PM (#3633671)
JavaScript with "use strict"--which is basically the modern version of JavaScript, but has to be enabled explicitly because of backwards compatibility--also warns you about assigning a variable that hasn't been declared. Just shows that JavaScript really was influenced by Scheme :).
Re:Why I don’t like Dynamic Typing by draegtun on Saturday February 25, 2012 @03:39PM (#3633795)
Ditto for Perl. And with modern Perl(s) this can be switched on with new language features using...

  use 5.010;  # or 5.012 or 5.014 and soon 5.016
Re:Why I don’t like Dynamic Typing by akkartik on Saturday February 25, 2012 @04:01PM (#3633841)
Ah, thanks both.
Re:Why I don’t like Dynamic Typing by gcv on Saturday February 25, 2012 @05:47PM (#3634077)
In both languages, the use of a variable is almost always preceded by a binding of that variable to a symbol or var using the "let" form. This accounts for most uses of variables, and attempting to access a misspelled variable will flag an error at compile-time.

With regard to destructive assignment, most Common Lisp compilers warn on setf calls when executed against unbound symbols. Clojure doesn't have even have assignment in the sense discussed here (refs are bound before use, and the compiler enforces this).