Re:How Javascript Prototypal Inheritance Really works
by munificent on Saturday May 28, 2011 @05:16PM
(#2595234)
Got any public code? I'd like to see examples of non-class-style JS code.
[ Parent
| on HN ]
Re:How Javascript Prototypal Inheritance Really works
by pom on Saturday May 28, 2011 @09:07PM
(#2595593)
You can have a look at: https://github.com/julienq/spqr/blob/master/populus.js
Bear in mind that it's still a work in progress. Look for "populus.object", especially create(), is_a() and call_super(). There is still something called $new (not new because some picky parsers don't like it) but it's just the chaining of create() (a wrapper around Object.create()) and init().
Re:How Javascript Prototypal Inheritance Really works
by jashkenas on Saturday May 28, 2011 @09:13PM
(#2595604)
Holy mother of ... https://github.com/julienq/spqr/blob/master/populus.js#L266-...