2011/9/27 David Bruant <[email protected]> > I just wanted to give a follow-up on that. I implemented it: > > https://github.com/DavidBruant/HarmonyProxyLab/tree/master/MutableProtoObjects
Nice experiment. Also, I implemented another flavor of Forwarder (similar to [1]) which > explicitly calls Object.getPrototypeOf when needed (which allows me to > return a different value when needed). I have no opinion on whether it's > better or worse, but i just wanted to point it out. > Right, I've also been thinking about this. There are two possible forwarding handlers: 1) one that uses the "virtual" prototype passed to Proxy.create 2) one that uses Object.getPrototypeOf(target) Option #2 is what's in the proposal [1]. I think that's a safe bet, since most proxies will not want to interfere with the prototype chain and will probably even set the virtual prototype equal to the target's prototype, in which case #1 and #2 are the same. We could make the choice between #1 and #2 configurable, but I don't think it's worth the additional complexity. Cheers, Tom > David > > [1] http://wiki.ecmascript.org/doku.php?id=harmony:proxy_defaulthandler >
_______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

