r/programming • u/zumpiez • Dec 22 '11
The Problem with Implicit Scoping in CoffeeScript
http://lucumr.pocoo.org/2011/12/22/implicit-scoping-in-coffeescript/
83
Upvotes
r/programming • u/zumpiez • Dec 22 '11
View all comments
Show parent comment
6
u/[deleted] Dec 23 '11
given the design goal of "never have 'x' mean two things", i can see two clear options:
i don't think that the idea of "declaring a variable" is gone with the first one. the concept is still very important to how the program will run; the syntax is gone, but the semantics remain. if the variable was always a member variable or a parameter, and never a local variable, then the semantics would be gone as well, but that's not the case.
so, why not the second option, which prevents shadowing, and doesn't have the issue of breaking a function by changing an outer scope?