The class operator: a bridge between object and function exemplers

Brendan Eich brendan at mozilla.com
Thu Nov 17 15:22:28 PST 2011


On Nov 17, 2011, at 2:47 PM, Jake Verbaten wrote:

> This would involve changing
> 
> > The value of this internal property is a new function object defined as if by function(){}.
> 
> To 
> 
> The value of this internal property is a new function object defined as if by function(...args){ super.constructor(...args); }.
> 
> Personally I think invoking the super constructor as default behaviour makes more sense. However we may want to optimise this so it only invokes the super constructor if the super constructor is not Object.
> 
> [ credit to Axel ( https://gist.github.com/1374226 ) for default constructors invoking super.constructor ]

That's it, thanks.

/be
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20111117/936382bb/attachment.html>


More information about the es-discuss mailing list