Traits in use (was Re: Re: Squeak and Namespaces)

tim Rowledge tim at rowledge.org
Fri Dec 1 19:16:28 UTC 2006


On 1-Dec-06, at 11:05 AM, Avi Bryant wrote:

> On 12/1/06, J J <azreal1977 at hotmail.com> wrote:
>
>> Yes, the inheritance model without them has some real problems.   
>> And finding
>> a solution is tough.  C++'s multiple inheritance?  Too  
>> complicated.  Java's
>> interfaces?  Too much work and code duplication.  So now smalltalk  
>> has a
>> solution, and IMO the best one.
>
> Is that opinion based on real-world use of Traits?  Now that they've
> been in the base image for a decent length of time, I'm curious to
> hear of any war stories from using Traits outside of a research
> context.  I've never used them in anger myself, so it would be very
> interesting to hear from those who have.

I've not tried to use them but I did trip over them when working on  
cleaning up the compiled method source pointer mess (which I still  
haven't finished, rats). The problem is that the tool support appears  
to be missing, which is a real pain. For example, I edit a trait- 
method in one place that it is incorporated (imported? linked?  
whatever) and there is nothing that tells me it is a trait, or asks  
me if I want to make my change a local version or a global one or  
anything at all. No matter how good an idea is, without proper  
integration it ends up causing problems.


tim
--
tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
Useful random insult:- Pedaling real fast, but not getting anywhere.





More information about the Squeak-dev mailing list