A practical problem for Traits (hopefully :)

Andreas Raab andreas.raab at gmx.de
Sat Feb 24 06:13:15 UTC 2007


Klaus D. Witzel wrote:
> As can be seen from the attached source code, W3's "modules" when 
> implemented as Traits can be attached easily to Todd's fine classes, 
> without any side effect, in a Monticello-friendly fashion. And if 
> someone would decide to get rid of such "crap" then the Traits can as 
> well be deimplemented without any side effect.

That is a very interesting (and to me novel) approach of applying 
traits. I have two questions about this:
a) Since there is no code in the traits yet, it is hard to say how the 
use of state would affect the ability to mix the various traits 
depending on the ui framework chosen. Do you have any idea how to go 
about state?
b) Is there any fundamental difference in doing what you did (using 
traits) compared to what you would achieve with inheritance? Since 
practically all subclasses are immediate children of the DOM node, one 
could imagine to introduce a bit more hierarchy instead of mixing in 
traits. How do you feel about that?

> I would appreciate if the Traits discussion could be directed towards 
> practical solutions for this practical problem. I hope that the html+css 
> project can benefit from your expertise, experience and opinion.

It's definitely nice to see something novel like this. Are you planning 
on continued development? I would be very curious to follow this project 
to see how it goes as more code needs to be handled.

Cheers,
   - Andreas



More information about the Squeak-dev mailing list