On 9/20/2013 12:19 PM, Jason Orendorff wrote:
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.

Actually, taking the precedent of removing "getPropertyDescriptor", it's "has" that would be removed. The implementation of [[Has]] can easily walk the [[GetPrototype]] chain calling "hasOwn" on each until true or [[GetPrototype]] returns null. In fact, some agreed for a short time to *remove* the "has" trap specifically for this reason, but it was added back.

https://mail.mozilla.org/pipermail/es-discuss/2012-November/026274.html
_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to