r/programming • • Jul 25 '13

CoffeeScript's Scoping is Madness

http://donatstudios.com/CoffeeScript-Madness
207 Upvotes

315 comments sorted by

View all comments

Show parent comment

1

u/tiglionabbit Jul 26 '13

I could break your global value that you declare in another file somewhere.

No. CoffeeScript compiles each file in isolation.

Lexical scope IS shadowing

I prefer not to conflate those two ideas. Besides, CoffeeScript allows shadowing if you do it in function arguments (or using do). They just discourage the practice, because a program is simpler to understand if you're not shadowing names all the time.