Despite separating out @@create into a property of functions, which allows allocation and setting of BuiltinBrand for subclasses, this still leaves inheriting from most builtins just short of possible because they are "construct sensitive". The new ES6 classes like Map, Set, WeakMap, and typed arrays have been carefully designed so the constructor initializes `this`. But this still leaves most of the existing builtins un-subclassable. I know there's a strawman that addresses this, and many of the recent changes to the ES6 spec have been moving toward making this possible, but I don't recall seeing commentary on a planned solution for this.
It seems like the last hurdle to actually making this work is simply making it possible for `super` to just "forward" to EvaluateCall or EvaluateConstruct depending on which of them invoked the function that the super call was in. Is this solution possible for ES6? Or maybe there's another plan in the works to address this? Or is this something that can be looked for in harmony (which I presume now refers to es-after 6/es7)?
_______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

