To Traits Or Not To Traits (Was: Re: Stefs roadmap for 3.9, time to get it nailed down)

stéphane ducasse ducasse at iam.unibe.ch
Thu Feb 24 21:54:35 UTC 2005


Hi steven

> You look at this stuff and have to wonder of Traits might not be a 
> nice arrow to have in the quiver for modularizing the image.

Indeed read the OOPSLA paper and the image containing the refactored 
library should be around to have a look because
nathanael and andrew always told me that it could better if the code 
would have been designed with traits in mind vs. subclassing hacks.

> It would be great to get a rough, pseudo coded example from a Traits 
> proponent on what a Traits-based solution might look like for making 
> Networking in Squeak cleaner and more modular (too choose an arbitrary 
> example). Let's say there were 3 competing networking frameworks, call 
> them "StandardNetworking", "RefactoredNetworking", and "Flow".

Read the OOPSLA paper for that.

> How might a Traits-based solution look for making the competing 
> frameworks pluggable?

Traits provide you method categories kind of abstraction with required 
methods to get the entire
method collection working (a bit like an abstract class that you can 
plug in any class you want).

> If, say, FileList2 decided to make the switch from 
> "StandardNetworking" to "Flow", would Traits help?

If both have a nearly similar interface it would work. But this is up 
front design.

> It might persuade some more people to promote Traits on "The big 
> priority list in the sky" if it looks like it would help with some of 
> the other big priorities.
>
> At any rate, it's easy to see how Traits might provoke some strong 
> feelings.

:)
Especially since we are working on something else for our research now 
:)
So we do that because we think that this is good for squeak and not 
only as smart guys with big egos.
Because researcher egos are in big papers in prestigious conference not 
languages with mickey mouse
shape. Believe this is like that, else they would be much less 
researchers on typed-languages.
And people would have less this condescending smile when I say that I'm 
programming in Squeak.

Stef

PS: by the way I hope one of your keybinding goodies will get in 3.9 (I 
forgot the connection with the keymapper/binding)
But having that in the image with a cool emacs bindings would be 
realllllly coooool




More information about the Squeak-dev mailing list