@@new
Jason Orendorff
jason.orendorff at gmail.com
Tue Jun 17 15:12:29 PDT 2014
On Tue, Jun 17, 2014 at 4:24 PM, Dmitry Soshnikov
<dmitry.soshnikov at gmail.com> wrote:
>> Anyway --- skipping a base class constructor is not a normal thing to
>> do. It shouldn't be the default.
>
> That's the question. I guess there could valid cases when you wanna call
> parent constructor conditionally as was shown, or to call it after prologue
> initialization (which probably would set some default props needed for the
> parent ctor) in the child constructor.
That's fair. Developers who need that can write a `static
[Symbol.new]()` method, of course.
I proposed what I did because I think it's more common to want to
control the arguments passed to the base class constructor than to
want to do other work before calling it, and it's very rare indeed to
intentionally skip base class initialization. But all three are
possible with this proposal.
-j
More information about the es-discuss
mailing list