[squeak-dev] On traits composition

Colin Putney cputney at wiresong.ca
Tue Dec 8 16:59:30 UTC 2009


On 7-Dec-09, at 9:01 PM, Andreas Raab wrote:

> Oh, and one more issue: I'm starting to question the idea that  
> "conflicting" trait methods should create a trait conflict. It seems  
> to me that "last one wins" would be more useful, i.e., if you have  
> two traits t1 and t2 and use them via t1+t2 you get t2's version; if  
> you use them via t2+t1 you get t1's version. You're always free to  
> override the version if you don't like the result but I think that  
> "last one wins" will be a useful outcome in more cases than raising  
> an error :-)

That wouldn't be Traits, it would be Mixins. Maybe you'd rather have  
Mixins? It would be interesting to compare Strongtalk's collection  
classes to the paper about refactoring Collections to use Traits.

Colin



More information about the Squeak-dev mailing list