Morph selectors size -> 924

John.Maloney at disney.com John.Maloney at disney.com
Thu Jun 21 14:35:12 UTC 2001


Stephane,

I concur, I'd love to see a smaller class Morph. Of course, it defines protocols
for a lot of functionality, so it will always be a larger-than-average class,
but earlier versions were a mere 200-300 methods, I believe.

Unfortunately, classes like Morph, Object, Collection, and Number tend
to accumulate methods because they are the roots of large hierarchies of
useful classes. And once methods are added, they are difficult to remove
because other code depends on them. My conclusion is that code bloat
is a natural progression in any useful class library. Every commercial
Smalltalk seems to bloat over time, and Java exhibits the same phenomenon.
We're fortunate that Squeak has a pretty efficient representation
of classes and methods, so the image size grows slowly as code is
added.

One could try to fight this effect, but I think you would risk either
creating a sterile system that noone used (but it could be very small
and elegant) or you'd at least have to slow the rate of evolution to
a crawl so that every addition could be carfully considered and
discussed. Neither of these alternatives is in the spirit of Squeak's
open source nature.

So, while I also abhor the bloat, I've decided that the best thing
to do is to accept it as inevitable, try not to add to the problem
myself, and focus on building cool appliations on top of the system
as it is. (To be honest, I also dream of building a new Morphic-like
system from scratch some day, even though I know that that, too,
will become bloated if it is successful. But I sure do love the early days
of a system, when it is still small enough to keep it all your head.)

	-- John

P.S. The Squeak image is like a city. You can try to plan the general
layout, major streets, etc, but to some extent it just grows organically,
built by the people who live in it. And older cities, with a long
history of organic growth, are far more interesting than new,
"perfect" ones.

At 8:28 AM +0200 6/21/01, Stephane Ducasse wrote:
>Hi
>
>I'm starting to look at Squeak with our tools (moose and codecrawler). And
>while browsing I saw that Morph has 924 methods. I was thinking that there
>was a bug in our tools because I could not believe it.
>
>And sadly I checked in Squeak and yes there are 924 methods in the class
>Morph. 
>So any body has a suggestion on how to react?
>I'm not expert at all in Morph but I have the impression that if we do not
>do anything Morphic will really miss the point. I have the impression that
>the spirit of Morphic are rape when I see such a class.
>
>We can all laugh at Swing or other Java stuff when we have a big blob like
>that in our system. I hope that with the results of Stable Squeak we will be
>able to attack this problem.
>
>Stef







More information about the Squeak-dev mailing list