r/programming • • Dec 22 '11

The Problem with Implicit Scoping in CoffeeScript

http://lucumr.pocoo.org/2011/12/22/implicit-scoping-in-coffeescript/
83 Upvotes

116 comments sorted by

View all comments

Show parent comment

-3

u/showellshowell Dec 23 '11 edited Dec 23 '11

It's true that you have to stop to think about whether the variable name exists elsewhere, but it's trivial to find false cognates using your editor. The search is always worthwhile. You either verify that your new name is unique, or you learn more about the code below. For example, if you're introducing "user" at the top, but "user" already exists in other functions, then you might have opportunities for refactoring simplification.