[[Invoke]] and implicit method calls

Tom Van Cutsem tomvc.be at gmail.com
Fri Sep 20 11:17:59 PDT 2013


2013/9/20 Jason Orendorff <jason.orendorff at gmail.com>

> OK, taking all that at face value, what's the justification for .hasOwn()?
>
> a) allows more direct interception of Object.prototype.hasOwnProperty()
> b) potentially less allocations each time someone calls .hasOwnProperty().
>
> I think .hasOwn() should be removed.
>

I assume you're making the case to remove all derived traps then, not just
hasOwn()?

The question is where to draw the line. get() and set() are also derived
traps: they can be defined in terms of
getOwnPropertyDescriptor/defineProperty, but here the "overhead" of always
having to work with descriptors really becomes manifest. Do you think they
should also be removed?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20130920/1848daeb/attachment.html>


More information about the es-discuss mailing list