Is Object bloated?

Daniel Vainsencher danielv at netvision.net.il
Tue May 27 10:07:30 UTC 2003



JOEL SHELLMAN <joelhelenshellman at comcast.net> wrote:

> Why should the Object class know anything about morphs, SUnit,
> skins, and collections?
That's the heart of the matter - not only does it make Object big, it
also makes the things it knows harder to remove from the image, and
harder to understand.

> I assume that nearly everything subclasses from Object, correct? Why is
> Object so huge?
Why do famous people have many friends? Because being known by a more
generally used class is an expedient way to make your specialized/new
class more easily usable. Suppose you define a bunch of classes that get
and graph quantities over time. You want people to use it to graph web
based stats. What an easier interface to learn?
MyGrapher tickerFor: 'http://.....' or
'ticker://...' asUrl

This is of course just an example. Many patterns work much cleaner if
the other classes collaborate with you, than if they remain unaware.
That's why class extensions are needed.

> And I guess what I'm really asking is... "should" Object be this huge, 
> or
> has it just become such from poor design or some other reason?
Since Squeak hasn't had class extensions till recently, and PackageInfo,
which provides them, still isn't standard in the image, I guess you
could say it's a tools issue.

Daniel



More information about the Squeak-dev mailing list