"Syntax for Efficient Traits" is now ready for discussion (was: Classes as Sugar is...)

Mark S. Miller erights at google.com
Tue Sep 14 08:46:45 PDT 2010

On Tue, Sep 14, 2010 at 4:47 AM, P T Withington <ptw at pobox.com> wrote:

> On 2010-09-14, at 04:56, Tom Van Cutsem wrote:
> > If we want to stick to reserved keywords, "implements" seems the most
> > appropriate (although this similarly confuses trait composition with
> > interface implementation).

In the default remains override, "extends" seems more natural than

> Alternatively, you could repurpose the (now disparaged) `with` keyword.
>  That's what OpenLaszlo uses for its paint:
>  class sundae extends icecream with jimmies, chocolatesauce, cherry
> implements dessert;
> Hmmm. "with" reads well, no matter whether the default is compose or
override. And given its position, there's no ambiguity with its other legacy
uses. Good suggestion!

Btw, the current proposal does currently repurpose "with" for renamings.
Even though there's no syntactic conflict, if we use "with" instead of
"mixin" we should choose a different syntax for renamings. Suggestions?

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

More information about the es-discuss mailing list