> From: Jake Verbaten <[email protected]> > Subject: new <Object> > Date: October 11, 2011 20:53:58 GMT+02:00 > To: es-discuss <[email protected]> > > is there any kind of proposal for syntax that is like: > [...] > var o = new proto(someValue);
There has been a long discussion here, a few months ago. I’ve tried to summarize it here: http://www.2ality.com/2011/06/prototypes-as-classes.html The discussion ended with the following conclusion: - Pro: Yes, it would make things simpler. I would even argue that new-style classes being able to extend old-style classes would be enough. Furthermore, Python has successfully switched from one style of class to another one. - Contra: It would introduce a second protocol for inheritance and it would probably not find universal acceptance (some people find prototypes-as-classes more elegant, others like constructor functions). Furthermore, class literals practically look and feel like prototypes-as-classes, so that it’s a good enough solution for me. Axel -- Dr. Axel Rauschmayer [email protected] twitter.com/rauschma home: rauschma.de blog: 2ality.com
_______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

