July TC39 meeting notes, day 1

Andreas Rossberg rossberg at google.com
Mon Aug 8 08:50:16 PDT 2011


On 4 August 2011 19:34, Brendan Eich <brendan at mozilla.com> wrote:
> On Jul 31, 2011, at 1:04 PM, Sean Eagan wrote:
>
>> A 'receiver' argument is not needed because it would never be
>> different than the proxy, and the proxy can either be passed as an
>> argument or stored either as an own property of the handler, or as a
>> value keyed by the handler in a weak map, which there seems to have
>> been TC39 concensus on.
>
> Ok, right -- even without the extra proxy parameter in addition to receiver, dropping receiver makes sense. Sorry to go in a circle on this.
>
> It's a trap API change, and I agree with Mark that we need Tom to bless it.

I would welcome removing the extra receiver (or proxy) arguments from
get and set traps. However, it seems to me that the main reason,
currently, for having them is that they are needed by the default
traps, in case the respective descriptor returned by
getOwnPropertyDescriptor has a getter/setter (which need a receiver).

Arguably, making a proxy trap return getters/setters seems a somewhat
pointless use case anyway. But nevertheless we need to have some
reasonable semantics for it.

/Andreas


More information about the es-discuss mailing list