Symbol.hasInstance and [[Get]] vs [[GetOwnProperty]]
Jason Orendorff
jason.orendorff at gmail.com
Tue Aug 16 12:38:11 UTC 2016
On Mon, Aug 15, 2016 at 8:45 PM, /#!/JoePea <joe at trusktr.io> wrote:
> It seems like using [[Get]] for looking up `@@hasInstance` can be
> confusing and requires devs to write extra code.
>
I think the emotionally loaded words in this post ("fail", "ugly",
"fragile", "break") are unhelpful. You have to make your point some other
way.
The `c instanceof B` check (arguably unintuitively) fails.
>
It doesn't "fail". B inherits behavior from its base class A. That's the
whole point of subclassing.
-j
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20160816/b0575664/attachment.html>
More information about the es-discuss
mailing list