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 [email protected] https://mail.mozilla.org/listinfo/es-discuss

