2013/9/19 Brendan Eich <[email protected]>

> Refactoring [[Get]]+[[Call]] to [[Get]]+[[Invoke]] seems fine by me. It
>> better expresses the intent, and the change should only be observable to
>> proxies.
>>
>
> Is this so? Wouldn't an ordinary object with a getter be able to observe
> the two lookups? Indeed wouldn't the spec require this?


You're right. The change would lead to observably different behavior for
conditionally invoked getters.

Not sure how much of a backwards compat issue that would be. Allen
previously wrote upstream in this thread:

There are currently 6 such places (not counting the Proxy trap invocators):
> 3 in ToPrimitive (ie toSrting/valueOf)
> 1 in instanceof to access @@hasInstance (legacy conpat. for missing
> @@hasInstance)
> 1 in [ ].toString to conditionally invoke 'join' method
> 1 in JSON.stringify conditionally invoke 'toJSON'


How likely is it that these are getters with side-effects?
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to