Yet another class declaration proposal
Allen Wirfs-Brock
allen at wirfs-brock.com
Thu Nov 3 10:08:23 PDT 2011
+1,000,000
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.
allen
On Nov 3, 2011, at 9:14 AM, Axel Rauschmayer wrote:
> FWIW: I’ve picked what I like from the various proposals.
>
> https://gist.github.com/1336846
>
> --
> Dr. Axel Rauschmayer
> axel at rauschma.de
>
> home: rauschma.de
> twitter: twitter.com/rauschma
> blog: 2ality.com
>
>
>
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
>
More information about the es-discuss
mailing list