[Pharo-project] Smells looking at collections

Florin Mateoc fmateoc at gmail.com
Tue Oct 26 09:21:02 EDT 2010


Eliot wrote:

    Hi Levente,

        in my experience playing with the Dan and Alan Borning's multiple
    inheritance implementation getting things to work was one thing, reasonably
    straighforward, but getting tool support right (file-out format so that
    things filed back in correctly, etc) was another, an dth ebulk of the work.
    Looking at your proposal below I see no problem getting it to work but see
    lots of problems integrating it, e.g. with Monticello, etc.  Traits is
    already integrated with Monticello, supported with tests, etc.  As such it
    is a much less risky or effortful proposition than a new scheme.  So with
    that in mind are there important functional benefits of your scheme's direct
    state access as compared with traits that use accessors to access state that
    each user of a trait must implement?  i.e. what are the key benefits you see
    in direct inst var access?

    best
    Eliot


Hi Eliot,

I think there is a strong argument for stateful traits, especially since we are talking about collection smells.
One of the main selling points for traits (for me, at least) is that they would allow us to clean up the mess
created by inheritance for reuse (Dictionary is a Set) in existing libraries.
And obviously to create cleaner libraries going forward.
Well, inheritance for reuse is used not just for behavior, but for state as well.
Stateful traits would allow for a cleaner separation between inheritance and subtyping.
Stateful traits would even allow you to push the separation further and, as part of your design, you could have
state-only traits
complementing behavior-only traits.
Let us not forget that clean concepts are also easier to learn. I think it is much more important to get the concepts right
than any existing integration with Monticello. Why does it matter that we have tests and integration if people are not
using traits?

Cheers,
Florin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pharo.org/pipermail/pharo-dev_lists.pharo.org/attachments/20101026/4f8c0b05/attachment-0001.html>


More information about the Pharo-dev mailing list