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
2
u/inmatarian Dec 22 '11
It's worth mentioning that in Lua, everything is considered global by default, unless marked as a local variable. So, to extend the example:
Also, any executing code is considered to be a running function, you could issue a local declaration at the global level, and have it not stored in the global environment, but rather it remains local to the file.
My only gripe is that
localis a pain to type over and over. I would have preferred eithervarormy.