[Newbies] Traits Example

Rob Rothwell r.j.rothwell at gmail.com
Mon Mar 17 12:05:48 UTC 2008


On Mon, Mar 17, 2008 at 7:07 AM, Oscar Nierstrasz <
oscar.nierstrasz at gmail.com> wrote:

>
> Hi Rob,
>
> What you say seems to make sense, but it is hard to tell without
> looking at some code.
>
> There are some simple examples of traits in Chapter 5 of Squeak by
> Example.
>
> http://SqueakByExample.org/SBE.pdf


Thanks, Oscar...and there it was, right in front of me all along.

"A trait is a collection of methods that can be included in the behaviour of
a class without the need for inheritance. This makes it easy for classes to
have a unique superclass, yet still share useful methods with otherwise
unrelated classes."

This may just be what I was looking for!

Thanks again,

Rob
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/beginners/attachments/20080317/0a144b22/attachment.htm


More information about the Beginners mailing list