On 27.03.2011 22:33, Juan Ignacio Dopazo wrote:


On Sat, Mar 26, 2011 at 6:31 PM, Dmitry A. Soshnikov <dmitry.soshni...@gmail.com <mailto:dmitry.soshni...@gmail.com>> wrote:

    Why not just to use already reserved `extends` keyword for
    specifying a superclass? These XML-like braces looks not so elegant.


I asked this question a couple of days ago.

Really? Sorry, seems I missed, I'll take a look (a direct link will be appreciated).

The answer is quite simple. Object initializer extensions are more than just constructor syntax. They allow you to create complex objects without all the hassle in (function(){}()). So the constructor syntax was made this way to be consistent with object initializer syntax.


There can be exception for at least class definition since `extends`, repeat, is/was already reserved and familiar to many programmers.

Dmitry.
_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to