News for hackers. Stuff that matters.
Re:The Problem with Implicit Scoping in CoffeeScript by satyr on Thursday December 22, 2011 @12:01AM (#3380465)
The inconsistency doesn't stop there; `for` variables are specialcased:

    bar = ->
      alert "Holy crap cheese is awesome!"

    foo = ->
      for bar of bars
        console.log bar
      return
↓

    var bar, foo;

    bar = function() {
      return alert("Holy crap cheese is awesome!");
    };

    foo = function() {
      var bar;
      for (bar in bars) {
        console.log(bar);
      }
    };
Re:The Problem with Implicit Scoping in CoffeeScript by cheald on Thursday December 22, 2011 @06:16AM (#3381165)
That makes plenty of sense to me; when do you ever want to leak a for loop counter to an outer scope?
Re:The Problem with Implicit Scoping in CoffeeScript by satyr on Thursday December 22, 2011 @06:30AM (#3381197)
And when do you ever want to leak local variables to an outer scope? Never.

Not to mention that loop counters are no different than other `var`iables in JS.

Re:The Problem with Implicit Scoping in CoffeeScript by cheald on Thursday December 22, 2011 @02:15PM (#3382836)
You do want to sometimes reference outer scope variables from inner scopes, though. The only difference between a leaked local and a properly referenced global is usage semantics.