Finding a "safety syntax" for classes

Russell Leggett russell.leggett at gmail.com
Tue Mar 20 12:39:49 PDT 2012


On Tue, Mar 20, 2012 at 3:34 PM, Rick Waldron <waldron.rick at gmail.com>wrote:

> Another option here would be:
>>
>> class Snake extends Animal {
>>     // Using "new" ; )
>>     new(name) : super(name) {}
>> };
>>
>>
> This could be visually mistaken for an object literal.
>
>
Did I mention controversy? :) Also - it breaks the nice overlap with object
literal syntax (even with extensions). Right now we have a nice restriction
that means we could technically go either way with the class body. I think
that's probably the easiest way to get this through.

- Russ


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


More information about the es-discuss mailing list