New ES6 draft now available
Tom Van Cutsem
tomvc.be at gmail.com
Sun Nov 25 12:41:57 PST 2012
Great to see a first draft of the Proxy spec. I'll study this revision more
closely over the coming week.
Some initial comments below:
2012/11/23 Allen Wirfs-Brock <allen at wirfs-brock.com>
> • MOP changes: Added [[GetInheritance]]/[[SetInheritance]] as internal
> methods for accessing [[Prototype]] internal prototype chain.
I would rename these to [[GetProto]]/[[SetProto]] (or [[GetPrototype]] as
> Added [[[IsExtensible]]/[[PreventExtensions]].
> Replaced [[Get]]/[[Put]] with [[GetP]]/[[SetP]]. At some point we may be
> able to rename these as [[Get]]/[[Set]].
+1 for [[Get]]/[[Set]]. The P suffix was indeed to distinguish this
operation from ES5.1 [[Get]].
> Eliminated [[GetProperty]], [[CanPut]], [[HasProperty]],
However, with [[HasProperty]] removed, I assume the "in"-operator no longer
triggers the "has" trap when it encounters a proxy, instead doing the
proto-chain-walk itself and calling "hasOwn" on each level. This is OK,
although it introduces an inconsistency with the other proto-chain-walking
algorithms, which stop when encountering a proxy, letting the proxy take
over from that point (this is the case for the "get", "set" and "enumerate"
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss