News for hackers. Stuff that matters.
Re:A Case Against Using CoffeeScript by judofyr on Wednesday December 14, 2011 @04:47AM (#3351253)
This isn't really about prototypal inheritance. If you wrote methods like this in Ruby, you would have the same issue:

    Klass.method := lambda { p self }
Also, if JavaScript looked like this, you wouldn't need the fat arrow:

    // Let's call this a "prototype function"
    Klass.prototype.function method() {
      …
    }
Together with these rules:

* A function always captures its outer `this`

* The getter of a prototype function (`thing.method`) always returns a binded function (where `this` == `thing`).

Re:A Case Against Using CoffeeScript by jashkenas on Wednesday December 14, 2011 @07:46AM (#3351592)
Absolutely. I don't mean that dynamic "this" is required by prototypal inheritance in general -- I mean that it's required because of JavaScript's particular implementation of prototypes, where they're exposed to you as a value, but there's no syntax where the language can tell that you're in the process of building one out.