[squeak-dev] Re: Traits on Gemstone

Sophie (itsme213) itsme213 at hotmail.com
Mon Nov 3 23:15:37 UTC 2008


"Matthew Fulmer" <tapplek at gmail.com> wrote in message

> If you need portability between Squeak and Gemstone, you should
> probably just forget about using Traits. Flatten all your
> classes using the above two lines, then delete all your traits.

In the (few) places that I have used traits, with quite simple usage, I've 
found them a great boon. Were it not for traits not working on Gemstone, I 
would have kept using them. Refactoring them entirely away would probably 
either require lots of duplicate methods, or moving methods too high for my 
liking (or too much hard re-thinking). Hence the home-brew approach!

Thanks for the caution about protocol differences, I will look out for that. 
The 2-liner you gave me should port easily enough, and keep me going for a 
while (famous last words :-)

- Sophie

p.s. as soon as I removed my traits from my code, my .mcz file now loads up 
fine into current dev images; previously I would get an error as soon as my 
trait was encountered, which I had posted about before but was not able to 
narrow down further. 






More information about the Squeak-dev mailing list