Finding a "safety syntax" for classes

Russell Leggett russell.leggett at gmail.com
Tue Mar 20 10:21:07 PDT 2012


>
> I would propose that the absolute minimal requirements would be:
>>
>>    - has a declaration form that uses the class keyword and an
>>    identifier to create the class
>>    - has a body that can include both the constructor function, as well
>>    as any instance (prototype) methods – including getter and setter properties
>>    - can declare the class as a subclass of a another class (probably
>>    with the extends keyword)
>>    - super is available from any of the methods or constructor function
>>
>> Does |move| become an instance property method or a prototype property
> method?
>

Yes - I apologize for any confusion - move would be a method on the class'
prototype. I'm not really suggesting anything new, just a simple syntactic
sugar over the normal way of creating a constructor function + prototype.

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


More information about the es-discuss mailing list