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
3
u/[deleted] Dec 23 '11
so your workaround is to do a search any time you want to use a variable? And how exactly does this make coffeescript easier to use than javascript? I can't see having to do a search every time I want to use a variable as somehow easier than javascript. That logic baffles me. You know, the only real way to be certain you don't have this particular coffeescript gotcha is to write only one function per file. If a serious coding shop were to adopt coffeescript, this would no doubt have to be one of the design patterns, because you just can't guaruntee that with a few people working on the same project files, you won't get someone that uses a variable name twice unless you limit your source to one function per .coffee file.