new instantiation design alternatives

Kevin Smith zenparsing at gmail.com
Fri Sep 19 02:43:26 PDT 2014


>
>
> I'm not sure that having two different ways to do subclassing is good.
>

This is noted in the "downsides" section of the gist.  I'll expand on this
point in a follow up...

    class C extends B {
>         static creator(...args) {
>             /* A */
>             return otherArgs
>         }
>         constructor(...args) extends new super(... C. creator(...args)) {
>             /* B */
>         }
>     }
>
>
Note that in the latest version "super" is not actually allowed within the
initializer expression.  This is to avoid confusion with the meaning of
"super" inside of method bodies (which does not change from the current ES
draft).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20140919/c5b1daa7/attachment.html>


More information about the es-discuss mailing list