About pushBack:

Jason Johnson jason.johnson.081 at gmail.com
Sun Aug 5 15:05:54 UTC 2007


Oh, and I forgot to mention:

I don't personally see traits as something that comes up that often.  99% of
the time inheritance, or some OO pattern gives the best solution.  But in
that 1% something like a trait is the correct solution and not having it
shows up a design wart.

Personally the thing that stuck out to me in my travels through the Squeak
image was just the Magnitude class.  I personally think that should just be
a trait.  In fact I would see at least equality and comparability as
separate traits.  By having it be a class causes certain design warts [1]
imo.

[1]  In the case where a class should really inherit somewhere else you
either have to inherit from Magnitude and duplicate the other code, inherit
from the correct class and duplicate the Magnitude code or change the
highest class in your hierarchy to inherit from Magnitude instead of
Object.  These solutions are all code smell imo.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20070805/5faefaa1/attachment.htm


More information about the Squeak-dev mailing list