I noted some open issues on "Classes with Trait Composition"

Mark S. Miller erights at google.com
Tue May 17 20:31:07 PDT 2011


On Mon, May 16, 2011 at 4:54 AM, Dmitry A. Soshnikov <
dmitry.soshnikov at gmail.com> wrote:
[...]

> Some simple examples of all use-cases would are needed I think.
>

Absolutely agree. I hope they are coming soon. Watch this space ;).



>
> Regarding `new` keyword for the constructor (aka initializer), after all,
> it als may be OK. E.g. Ruby uses `new` as exactly the method of a class --
> Array.new, Object.new, etc. Though,  `constructor` is also good yeah.
>

The history here is interesting. An earlier unreleased version of the
Traceur compiler used "constructor". When we saw Allen's use of "new" in one
of the object-literal-based class proposals, it seemed like a good idea so
we switched to that. In light of Brendan's criticism, we realized we should
return to "constructor" -- it's an elegant pun.


>
> Regarding two inheritance types, I think better to make nevertheless one
> inheritance type -- linear (by prototype chain).
>

Done.



> And to make additionally small reusable code units -- mixins or traits --
> no matter. Thus, of course if they will also be delegation-based and not
> just copy-own-properties, then we automatically get a sort of multiple
> inheritance.
>

Gone. Or rather, postponed into a strawman that will not be proposed till
after ES-next.

[...]

-- 
    Cheers,
    --MarkM
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20110517/441c44cd/attachment.html>


More information about the es-discuss mailing list