News for hackers. Stuff that matters.
Re:Show HN: Classes for javascript that you'd actually use by bmuon on Wednesday January 04, 2012 @09:16AM (#3424174)
Foo.prototype = new Bar() has the problem of setting the superclass' instance properties as prototype properties of the subclass. This can be solved pretty easily with something like Object.create (the first part explained here http://news.ycombinator.com/item?id=3424156). Here's a different example in 30 lines: https://gist.github.com/1032636

There are no comments on this comment yet.