[[CanPut]] semantics
Tom Van Cutsem
tomvc.be at gmail.com
Sun Sep 16 04:31:12 PDT 2012
>
> On Sep 14, 2012, at 7:05 PM, Brendan Eich wrote:
>>
>>> Oliver Hunt wrote:
>>>
>>>> My reading of [[CanPut]] implies that it only checks a single level of
>>>> the prototype chain. This seems incorrect to me but I thought I'd check
>>>> whether it is in fact intentional, or whether it's a spec bug.
>>>>
>>> See step 4 and later.
>>
>>
It's worth noting that the refactored [[Put]] algorithm at <
http://wiki.ecmascript.org/doku.php?id=harmony:proto_climbing_refactoring#refactoring_put>
(which should be behaviorally equivalent to the ES5 [[Put]] algorithm for
built-in objects) gets rid of [[CanPut]] and makes the proto-chain walk
much more explicit (see [[SetP]] steps 3,4 and 5).
I hope we can get these refactored algorithms in an ES6 draft soon. They're
some of the more fundamental algorithms of ECMAScript, so having more
eyeballs to scrutinize these algorithms would be good.
Cheers,
Tom
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20120916/a2da45c4/attachment.html>
More information about the es-discuss
mailing list