are RectangleMorph and Rectangle polymorphic

ducasse ducasse at iam.unibe.ch
Sun Nov 18 19:36:48 UTC 2001


Hi Dan

Thanks for this long answer. For the polymorphic question. I checked myself.
I was too fast on email. But this discussion is worth. This makes me think
about kind of interface documentation for class like SmallInterfaces. This
would be interesting to understand the polymorphic relationships that have
classes.

> To me, as I said, the current state of affairs is a manifestation of the
> difference between system programming and end-user programming.  And the
> question is:  Should there be any difference?  Alan will say no.  I say I
> don't know.  But Alan has often turned out to be right ;-).

I understand the point. I'm not sure that there is a solution. In addition
adding rectangle protocol to morph would really make the interface even
bigger. I was just programming a trivial model for animal behavior
simulation using rectangle and after I finished. I realized that it would be
cool to display it. So I thought easy I just have to replace the rectangle
that represents the animal world into rectangleMorph and hop. But I realized
I could not. 

I do not know why I tried, I think that this was the lazzyness to introduce
a model-representation layer but this is induced by the feeling that morphs
are concrete representation of objects.
We are brainstroming with Nathanael on mixins and I was wondering if
RectangleMorph and Rectangle are not a nice example where the simple
approach of mixin failed because you would like to specify mapping between
functionalities in one class over the other one. Anyway I'm trying to
analyse my thoughts.

Stef






More information about the Squeak-dev mailing list