[Harmony proxies] Proxies, prototype chain and inheritance

David Bruant david.bruant at labri.fr
Wed Mar 23 05:49:35 PDT 2011

Le 22/03/2011 00:08, David Bruant a écrit :
> Hi,
> Proxies can be helpful to emulate multiple inheritance
> (http://journal.stuffwithstuff.com/2011/02/21/multiple-inheritance-in-javascript/).
> Long story short, with the get and set traps, you can emulate this
> multiple inheritance without having the required prototype chain.
> However, since "Object.getPrototypeOf" and "instanceof" cannot be
> trapped, these cannot be used to observe inheritance. There are
> perfectly valid reasons for which they cannot be trapped, I won't
> question this. My present suggestion is a mechanism to unable
> inheritance observation while keeping a couple of language properties
> safe.
"unable"... I actually meant "enable", sorry.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20110323/a1e7cf3c/attachment.html>

More information about the es-discuss mailing list