News for hackers. Stuff that matters.
Re:CoffeeScript, a little language that compiles to JavaScri... by jashkenas on Friday December 25, 2009 @05:26PM (#1015431)
Thanks for the pointer. I've pushed a commit that avoids __proto__, and produces this...

CoffeeScript:

    Horse extends Animal
JavaScript:

    Horse.__superClass__ = Animal.prototype;
    Horse.prototype = new Animal();
    Horse.prototype.constructor = Horse;
Calling super uses the __superClass__ reference. I hate to add it as an enumerable property, but there doesn't seem to be any other way to get at it, and at least it's on the class and not the object.

There are no comments on this comment yet.