Le 09/05/2011 17:50, Tom Van Cutsem a écrit : > > Going in the direction you're describing would open the door for a > Object.getPrototypeOf trap (which I'm fine with). > > David > > > How exactly would Allen's suggestion of relaxing the fix > trap/configurable constraints open the door for supporting mutable > prototypes via a getPrototypeOf trap? I must be missing something. Allen's last paragraph was more general than relaxing the fix trap/configurable constraints (at least that's how I understand it).
Allen wrote: > I don't believe that guaranteeing these invariants is important enough to > for Proxies to be unusable for their primary use case of replacing/emulating > built-in and host objects. One could imagine a buggy Object.getPrototypeOf on an host object (consecutive calls returning different objects, for instance). Will a proxy for which Object.getPrototypeOf is not trappable be able to replace/emulate all cases? I admit that it is a bit hard to imagine, but in all rigour, there is no reason to think the prototype to be bug-free in all implementations (those which implement __proto__ in first line). Actually, a writable __proto__ could be implemented (I don't discuss now if it's a good thing) with an Object.getPrototypeOf trap. Couldn't be without. David
_______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

