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

2

u/didroe Jul 26 '13

You have to know to use local or := in the first place

I think the point is you would always use it when you wanted to declare a new variable, not only when you know it shadows something.

1

u/Shanebdavis Aug 01 '13

I agree that was probably the original intent. However, IMO, variable declaration doesn't fit the spirit of dynamically typed languages where brevity is typically valued over explicit declaration.

It does makes sense in a statically typed language, though . If variable declaration is desired, then languages like Dart (http://www.dartlang.org/) make more sense than CoffeeScript.