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.
View all comments
Show parent comment
1
u/tiglionabbit Jul 26 '13
No. CoffeeScript compiles each file in isolation.
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.