Yet another class declaration proposal

Axel Rauschmayer axel at rauschma.de
Thu Nov 3 10:38:12 PDT 2011


I’ve updated the gist with (most of) your suggestions and rationales for the decisions.

> Minor quibbles
> 
> get rid of
>   [incAge]: ...
> just make it
>   @incAge
> 
> we don't need both [propname] and @propname in property declarations and @propname has a narrower meaning (which is good).  Also, I don't want to unnecessarily couple object/class declaration syntax with [ ] semantics.
> 
> You don't show other at foo but we need it.  I would prefer it to be written as other. at foo
> 
> You don't show it, but I would be fine with @foo as an abreavation for this at foo but if it is available we could probably get away with requiring this. at foo
> 
> I know this will be controversial, but I would prefer only having the expression form.  The reason is that
> 
> let Monster =  Being <| mylib.mixin(Evil, Scary) <| class {...}
> 
> is an important usecase and it is harder to make the syntax work with a pure class declaration.


Fine with me, I don’t have any preference in this regard.

-- 
Dr. Axel Rauschmayer
axel at rauschma.de

home: rauschma.de
twitter: twitter.com/rauschma
blog: 2ality.com



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


More information about the es-discuss mailing list