Subj : Re: spidermonkey api To : Jens Thiele From : Brendan Eich Date : Thu Nov 04 2004 09:15 pm Jens Thiele wrote: > I am currently mapping c++ class-based inheritance to prototype based > inheritance. > > In JavaScript: > > function Base() { > }; > Base.prototype.baseMethod = ... > > function Sub() { > // Base.call(this); > }; > > Sub.prototype.__proto__ = Base.prototype; > Sub.prototype.specialized = ... Why aren't you setting Sub.prototype = new Base; ? /be .