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

I apologize if I sound a bit irate, but I am at this point, because I feel like people are picking on me just to make themselves feel better about claiming something that is completely factually wrong. I hope it doesn't come through too sharply, though.

I see you are getting downvoted everywhere for posts that are factually accurate. That sucks.

But it doesn't help to lecture people about closures, tell people to go read a textbook about lexical scope, claim that this behavior is exactly the same as any other language. The real issue is CoffeeScript's idiosyncratic rule for local variable declaration, which (at a minimum) is closely related to issues of scoping. People just do not expect this rule, whereas from all your posts it sounds like you think it is the most natural thing in the world (indeed, most of your posts don't even mention it). Without knowing this rule, how can people not come to the conclusion that there is something very wrong with the scoping in CoffeeScript?