Subj : Re: Private Data and Prototype Inheritance To : netscape.public.mozilla.jseng From : Brendan Eich Date : Fri Jan 09 2004 01:55 pm Brendan Eich wrote: > You can't delegate method calls from an object lacking private data to > one having private data where the method (function, getter, setter) depends on private data to do its work > , unless the prototype's getter/setter use the > prototype's privates, which would in general make a pigeon-hole problem > (only one prototype, many delegating instances). I hope this is clear. It's not a matter of language design, rather of engine implementation. The JSCLASS_HAS_PRIVATE flag is hidden, and you can't make a user-defined JSClass anyway, or call JS_GetPrivate or JS_SetPrivate from script. It's still possible to extend native classes, but you'll need either to use property (not private data slot) storage in the native base class, or else to wrap. /be .