Default constructor and extends null

Allen Wirfs-Brock allen at
Wed Aug 1 10:01:13 PDT 2012

I forget the second question, regarding empty constructors.

On Jul 31, 2012, at 9:46 PM, Erik Arvidsson wrote:

> ...

> Should we special
> case this and use an empty constructor if the super class is null?

Yes, seem necessary.  The default definition used for an empty constructor would then be something like:

 constructor(...args) {
      try  {super.constructor} catch (e) {return};

In the actual specification, I wouldn't use an exception but instead use the internal GetSuperBase operation in the guard.



More information about the es-discuss mailing list