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/didroe Jul 26 '13

Javascript has a similar problem, but you solve it in a weirder way (with self-calling functions).

Javascript has function scope variables (var) so the problem is limited to a function, not the entire scope chain. And "let" is coming in ES6 to give us block scope. And guess what "do" does, it takes a function and calls it in that weird way you're talking about.