Finding a "safety syntax" for classes

Rick Waldron waldron.rick at gmail.com
Tue Mar 20 11:01:57 PDT 2012


On Tue, Mar 20, 2012 at 1:21 PM, Russell Leggett
<russell.leggett at gmail.com>wrote:

>  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.
>

Got it - I had missed this.name (which implies that instance stuff is
created inside constructor()... ), but thank you for clarifying

Rick


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


More information about the es-discuss mailing list