callable objects ?

Brendan Eich brendan at mozilla.org
Tue Apr 17 16:06:24 PDT 2012


Axel Rauschmayer wrote:
> I would add: [[HasInstance]] -> @hasInstance

Yes, that one goes with @construct, and it seems safe to hook at 
base-level because only instanceof uses [[HasInstance]].

As Mark and Tom argued in the Proxy design docs, stratifying in a new 
proxy object is much safer when the trap is called all over, internally, 
and at points in ECMA-262 and real VMs where "usercode" is not expected 
to nest.

Further-base level traps need to be considered carefully on a 
case-by-case basis.

/be


More information about the es-discuss mailing list