r/programming • • Dec 22 '11

The Problem with Implicit Scoping in CoffeeScript

http://lucumr.pocoo.org/2011/12/22/implicit-scoping-in-coffeescript/
83 Upvotes

116 comments sorted by

View all comments

Show parent comment

5

u/LaurieCheers Dec 23 '11 edited Dec 23 '11

We don't wish to add useless statements to the language that only serve to help generate compile-time warnings, and don't affect runtime semantics at all.

Strange philosophy. Have you ever used C#'s "override" keyword? That absolutely fits this description, and yet, in my opinion, it's one of the best innovations in C#.

When there's an expression that could result in two different semantics (such as overload vs override, or declare vs assign), depending on the surrounding context, it is definitely worthwhile to require a "useless" statement to disambiguate the two. Explicit is good.