extends keyword instead of <superclass ... >
Dmitry A. Soshnikov
dmitry.soshnikov at gmail.com
Sun Mar 27 11:38:38 PDT 2011
On 27.03.2011 22:33, Juan Ignacio Dopazo wrote:
>
>
> On Sat, Mar 26, 2011 at 6:31 PM, Dmitry A. Soshnikov
> <dmitry.soshnikov at gmail.com <mailto:dmitry.soshnikov at 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20110327/b5112560/attachment.html>
More information about the es-discuss
mailing list