extending an ES6 class using ES5 syntax?
andrea.giammarchi at gmail.com
Sat May 14 07:11:43 UTC 2016
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.
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...
> es-discuss mailing list
> es-discuss at mozilla.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss