why not "new" instead of "constructor"?

Brendan Eich brendan at mozilla.com
Sat Nov 19 16:26:21 PST 2011


On Nov 19, 2011, at 3:54 PM, Axel Rauschmayer wrote:

>> 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.
> 
> That’s what I missed. But wouldn’t that change Allen’s `class` operator to something that performs David’s desugaring as a tranformation (from something that simply returns the value of property `constructor`)?

I'm not sure. The two proposals are independent so far. Harmonizing them could be helpful.

/be


More information about the es-discuss mailing list