Traits library

Tom Van Cutsem tomvc at
Thu Feb 18 11:17:47 PST 2010

> > As a unit of classification, interface types are more flexible than class
> > types (of course ES doesn't have interfaces, so I think a solid
> > object-type-testing mechanism would be a more useful addition to ES than
> > classes would be).
> This seems like an important loose end to me.  If Harmony adopts a
> declarative trait syntax, is there still a reason to have an orthogonal type
> mechanism, rather than traits being types?

It depends. Since traits don't extend or 'subclass' other traits, trait
types would not be able to express subtyping directly. And of course, it
conflates implementation types with interface types, but I have the feeling
many don't consider that to be a show-stopper :-)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list