extending an ES6 class using ES5 syntax?

Allen Wirfs-Brock allen at wirfs-brock.com
Mon May 16 19:20:15 UTC 2016

> On May 16, 2016, at 10:31 AM, Jason Orendorff <jason.orendorff at gmail.com> wrote:
> ...
> `B.prototype = Object.create(A.prototype)` is less of a problem, for
> our implementation, because objects created by constructor B later get
> a prototype chain where every object is clean (none of them have ever
> had their [[Prototype]] changed; so no assumptions have been
> invalidated).


Do you or have you considered special casing __proto__ used in object literals:


let p = {
   __proto__: Array.prototype,
   m1 () {…},
   m2 () {…}

Lots of good declarative shape information in that form.


More information about the es-discuss mailing list