Traits traits
Brian T. Rice
water at tunes.org
Thu Sep 23 11:05:02 PDT 2004
nicolas.pelletier3 at free.fr wrote:
> Hello,
>
> while working on an improved version of the tutorial, I inspected the
> delegation graph between Derivable and Cloneable. The results are in
> the attached file. There is a cycle between Derivable and Cloneable
> which makes Cloneable a Derivable and Derivable a Cloneable, so that
> the two concepts collapse.
This is a good analysis. Thanks especially for the diagram to explain
what the problem is to people.
> The culprit seems to be (as in the case of True clone) Traits traits,
> which delegates to Cloneable traits. I wonder if this should not be
> considered a mistake. Maybe Traits and Traits traits should instead
> delegate to a TraitsDescription object (imitating what is done in
> Smalltalk with Class, Metaclass and ClassDescription).
We might do this, but what we're leaning towards lately is to make
traits a special slot (like the map is special), so that it is treated
differently by the lookup procedure (basically only to follow the first
traits link and none after that). This effectively alters the diagram so
that traits links are all "directional" (say, vertical where the rest
are diagonal or horizontal). This would also pretty much make traits
relationships required, so it would alter the language a bit, but the
benefit of clarifying inheritance from basic delegation certainly
outweighs it.
What do you think?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: water.vcf
Type: text/x-vcard
Size: 265 bytes
Desc: not available
Url : /archives/slate/attachments/20040923/764e6b41/water.vcf
More information about the Slate
mailing list