Traits for modularity

Daniel Vainsencher danielv at
Tue May 2 17:21:33 UTC 2006

Klaus D. Witzel wrote:
[Andreas critiques Traits decomposition of behavior as an example of 
modularization by Traits]
> I'd say the example you used is a good one. It is fairly complex and 
> is part of something which everybody in squeak-dev understands: behavior.
Actually, I think Behavior and friends are hugely complex, very little 
understood, were not brought to a local minimum of complexity when 
Traitified (not that I blame anyone), and therefore make for a terrible 
example on how to do modularization using Traits. AFAIK, the main reason 
to Traitify behavior, was that the implementation of Traits itself 
otherwise requires duplication. A good reason in itself, but it doesn't 
solve the need for a good example.

>> Anyway, if you think that example is badly chosen or if you have 
>> another example that shows how traits help modularity (or even if you 
>> just have gut feelings ;-) I'd be interested in hearing more about it.
I've read the paper about factoring collections using modularity, and I 
thought it added quite a few interfaces that are meaningful and thin, 
and at least some of the Traits have names that it makes sense should exist.

Haven't read the code though, and its not a live example, AFAIK. So 
Andreas' question stand lively...


More information about the Squeak-dev mailing list