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

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

On Sun, May 15, 2011 at 11:49 PM, Brendan Eich <brendan at mozilla.com> wrote:

> On May 15, 2011, at 10:01 PM, Brendan Eich wrote:
> http://wiki.ecmascript.org/doku.php?id=strawman:classes_with_trait_composition#open_issues
> This looks pretty good at a glance, but it's a *lot*, and it's new.
> Looking closer, I have to say something non-nit-picky that looks bad and
> smells like committee:
> http://wiki.ecmascript.org/doku.php?id=strawman:classes_with_trait_composition#inheritance
> Two kinds of inheritance, depending on the dynamic type of the result of
> evaluating the //MemberExpression// on the right of ''extends''? That will
> be confusing.

This smell is actually just my fault; it did not derive from ideas arrived
at in meetings. In any case, it is gone. "super(x, y);" is now always simply
equivalent to "Superclass.call(this, x, y);", but as if using the original
rather than the current binding of Function.prototype.call.

> Is the traits-composition way really needed in this proposal? If so, then
> please consider not abuse ''extends'' to mean ''compose'' depending on
> dynamic type of result of expression to its right.

All dependencies on traits have been separated into a separate strawman,
extending this one, but not to be proposed until after ES-next. The only
inheritance in this one is traditional JS prototypal inheritance.

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

More information about the es-discuss mailing list