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

0

u/PaintItPurple Jul 26 '13 edited Jul 26 '13

Python classes work this way. Broadly, you'll get some variant of this in any language that has nested scopes and uses the same syntax for definition and reassignment.

As I said in another comment, I think the weirdness here is not so much in the scoping rules, but in the ambiguity of the = operator.