>
> Another way of solving the inconsistency I see in providing the 6
> "prototype-climbing" traps ("getPropertyDescriptor", "getPropertyNames",
> "has", "get", "set" and "enumerate") and protecting Object.getPrototypeOf
> and instanceof could be to provide a softer version of proxies where these
> traps wouldn't be provided. Prototype-climbing internal methods would be
> delegated to the ECMAScript engine with the default behavior they have on
> objects (but still calling own traps when their algorithm requires them to).
> By design of this softer version, proxy writers would be ensured that
> inheritance will be done properly for them and they don't have to worry
> about it. They would just have to take care of the own properties "layer".
> (This paragraph is a slightly different topic. If you feel it requires its
> own thread, feel free to fork)
>I think this "softer version" already exists. If we can get agreement to turn getPropertyDescriptor and getPropertyNames into derived traps (see < http://wiki.ecmascript.org/doku.php?id=strawman:proxy_derived_traps>), then all of the prototype-climbing traps become derived. As such, proxy writers that stick to overriding only fundamental traps will only need to take care of the "own layer", and inheritance will be taken care of by the default implementation of the derived traps. Cheers, Tom
_______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

