Traits approaching mainstream Squeak

Jecel Assumpcao Jr jecel at merlintec.com
Sun Aug 28 04:05:12 UTC 2005


Andreas Raab wrote on Sat, 27 Aug 2005 21:48:53 -0400
> Well, I think we have a few good things that we should try, including: 
> What if we avoid inheritance completely? (I think that's worth a try 
> just to see how it feels) How would a coarse-grain set of traits "feel"?

At the OOPSLA 2003 presentation about Traits, David Ungar asked about
this: why have both inheritance and traits? The answer, of course, is to
allow Squeakers to ignore Traits once they are in the system for as long
as they like. Dave was thinking in the context of new language design
and not patching something that thousands of people are using every day
(I am typing this in Squeak, for example, and would hate to have to wait
until Celeste were ported to some new system organization).

For Neo Smalltalk I took this suggestion seriously and eliminated
inheritance. An object is just a list of "facets" (they don't have the
fancy dependency stuff that traits do so it is better to have a
different name). Since this isn't running I don't have any actual
experience with this style or programming yet. But based on a few years
with Self I plan to keep these facets as few and as large as possible.
In fact, the idea is to have a single facet for an object until I need
to share a part of it but not the rest and then I plan to refactor on
demand, splitting the facet as needed. So the result would be an
implementation driven factoring and not on a purely logical design.

-- Jecel



More information about the Squeak-dev mailing list