extending an ES6 class using ES5 syntax?

Andrea Giammarchi andrea.giammarchi at gmail.com
Sat May 14 07:11:43 UTC 2016

Hi Boris,
  not the first time I read your comments about this. I have two questions:

   1. why is that? the most annoying warning ever in Firefox. There is a
   spec'd method that is not even on Annex B and Firefox deliberately
   discourage its usage. Why I don't see warnings every time I
   `[].slice.call(arguments)`? I understand it might de-optimize but I wonder
   if that's really always necessary (maybe it doesn't have to deopt if it's a
   well known operation with a predictable result). On the other side, I also
   wish Firefox woudn't show warnings about modern and recent specifications.
   Deprecated stuff is OK, opinionated and "not reasoned so well on console"
   warnings are ... yak?!
   2. where were you when the `__proto__` landed on specs? :P

Thanks for any clarification.

Best Regards

On Sat, May 14, 2016 at 3:30 AM, Boris Zbarsky <bzbarsky at mit.edu> wrote:

> On 5/13/16 9:04 PM, Domenic Denicola wrote:
>>    Object.setPrototypeOf(obj, new.target.prototype); // or B.prototype,
>> but if you derive from B you'll have to do this dance again
> This is highly undesirable because it will deoptimize in implementations
> in practice.
> That said, can't the right thing be done using Reflect.construct?
> Object.setPrototypeOf(B.prototype, A.prototype);
> I believe this will, again, deoptimize in practice...
> -Boris
> _______________________________________________
> 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/20160514/389635a2/attachment.html>

More information about the es-discuss mailing list