why not "new" instead of "constructor"?

Brendan Eich brendan at mozilla.com
Sat Nov 19 14:45:22 PST 2011


On Nov 19, 2011, at 9:34 AM, Allen Wirfs-Brock wrote:

> <meta>In the following I'm going to use syntax from by class operator strawman: http://wiki.ecmascript.org/doku.php?id=strawman:class_operator However, the basic idea should be applicable to several of the class declarations proposal that are drifting about.
> 
> BTW, I'm  pretty sure that this isn't the first time the idea has been suggested.

By Bob Nystrom among others early this year.

Most recently here: http://wiki.ecmascript.org/doku.php?id=strawman:minimal_classes

Turns out anything we do here is a special form, at least for named classes. So 'constructor' in the harmony:classes proposal still on the wiki (which is not fully in Harmony)is not just a prototype method like any other. Therefore I agree we could use 'new' instead.

/be

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20111119/a66c50c5/attachment.html>


More information about the es-discuss mailing list