Interfaces without implementation are like a day without sunshine

Dave Herman dherman at ccs.neu.edu
Wed Oct 25 12:08:57 PDT 2006


> Perhaps I am mistaken, but it seemed to me the reason that traits can  
> be combined in any order is because traits explicitly disallow  
> conflicting properties.  (Either they are disallowed altogether, or  
> they have to be renamed.)  This is what I meant by 'traits remove  
> overriding from mixins'.

That's my understanding as well, although I'm not familiar with stateful 
traits. The 2006 paper by Flatt et al (below) might have something like 
that, but I haven't read it.

> My reading of Schärli, et al. is that traits are explicitly designed  to 
> remove features of multiple-inheritance and mixins that are deemed  
> dangerous (because they lead to ambiguities and fragility).  Am I  
> mistaken there also?

I think that's accurate, but I'm not an expert. But I believe it's an 
oversimplification to claim "interfaces << traits << mixins". In fact, 
it's not obvious to me that these features are mutually exclusive.

> I admit that I am out of the academic loop here.  If you can point me  
> to additional reading, I'd appreciate it.

I'm not really in the loop, either. My point is just that mixins and 
traits are different beasts, and esp. traits are pretty new territory.

The publications I know of are:

Gilad Bracha's work:
http://bracha.org/Site/Papers.html

John Reppy's work:
http://people.cs.uchicago.edu/~jhr/papers/object.html

Flatt, Findler, Felleisen, APLAS 2006
Scheme with Classes, Mixins, and Traits
http://www.cs.utah.edu/plt/publications/aplas06-fff.pdf

Findler, Flatt, ICFP 1998
Modular Object-Oriented Programming with Units and Mixins
http://www.ccs.neu.edu/scheme/pubs/icfp98-ff.pdf

Flatt, Krishnamurthi, Felleisen 1999
A Programmer's Reduction Semantics for Classes and Mixins
http://www.ccs.neu.edu/scheme/pubs/tr97-293.pdf

Scala:
http://scala.epfl.ch/intro/traits.html
http://scala.epfl.ch/docu/related.html

Fortress:
http://research.sun.com/projects/plrg/

And then the link you sent:
http://www.iam.unibe.ch/~scg/Research/Traits/

Dave



More information about the Es4-discuss mailing list