Symbol.hasInstance and [[Get]] vs [[GetOwnProperty]]
Andrea Giammarchi
andrea.giammarchi at gmail.com
Tue Aug 16 16:56:51 UTC 2016
fwiw I agree with Jason thanks gosh inheritance worked as expected even for
public statics.
If you want to overwrite the inherited behaviour just do that on class B
and eventually C.
On Tue, Aug 16, 2016 at 1:38 PM, Jason Orendorff <jason.orendorff at gmail.com>
wrote:
> 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
>
>
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20160816/b966c62c/attachment-0001.html>
More information about the es-discuss
mailing list