My ECMAScript 7 wishlist
brendan at mozilla.org
Wed Sep 24 15:28:16 PDT 2014
Tab Atkins Jr. wrote:
> Using subclassing to bung in some arbitrary trait is really terrible.
> :/ It requires either adding it up high in your class hierarchy, or
> having to write a custom NoSuchPropertyClass which extends your
> superclass, so you can then extend it.
Ok, let's not hand-wave mixin syntax, though (Andrea hacks __proto__).
What API do you prefer?
> I'm rather surprised that the group actually considered that sort of
> code to be appropriate - it's known that it doesn't compose well with
> other traits-as-superclasses or normal subclassing.
What code was not appropriate? TC39 balked at standardizing library API,
and good for them. You want better API, design it!
Or did you want `sealed class` or other such syntax, and I misunderstood?
More information about the es-discuss