[[Invoke]] and implicit method calls

Tom Van Cutsem tomvc.be at gmail.com
Mon Sep 23 01:40:23 PDT 2013

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

> On Fri, Sep 20, 2013 at 6:27 PM, Brandon Benvie <bbenvie at mozilla.com>
> wrote:
> > Actually, taking the precedent of removing "getPropertyDescriptor", it's
> > "has" that would be removed.
> I think the logic of the current design is: primitives we keep;
> high-level operations that correspond to everyday syntax built into
> the language from of old (get/set/has/enumerate), we keep. But
> .hasOwn, like .getPropertyDescriptor, is neither.

To me hasOwn() is as much a primitive as e.g. Object.keys().

The only odd thing about it is that it lives on Object.prototype rather
than as a static method on Object.

I don't see the inconsistency, unless you would also want to remove
Object.keys() because it can be expressed in terms of gOPN + gOPD.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20130923/3be68f3c/attachment.html>

More information about the es-discuss mailing list