Performing a method on only those objects which will understand it

Ned Konz ned at bike-nomad.com
Mon Jan 21 17:00:55 UTC 2002


On Sunday 20 January 2002 08:04 pm, Jim Rosenberg wrote:
> --On Sunday, January 20, 2002 9:54 PM -0500 "Andrew C. Greenberg"

> I thought of this. I noticed that the NKConnection Kit adds methods to
> Morph.  Frankly, doing this in my own case bothers me -- a lot.  It
> certainly would work for *me* -- for my own "private" image.  But what if
> *everyone* did this? 

The reason I added methods to Morph in my Connectors work is that I wanted 
Connectors to work with _any_ Morph.

If your code is supposed to work with any Morph then it makes sense to put 
code there. That is, if you're really extending what Morphs in general can do 
-- which is what I was doing -- then it makes sense to do this. If not, there 
are probably other ways to do what you want.

> If  everyone does this, there will be method explosion in class Morph that 
>will get out of hand in no time flat.

As opposed to the current situation, where there are only 1000 or so methods 
in Morph?

-- 
Ned Konz
currently: Stanwood, WA
email:     ned at bike-nomad.com
homepage:  http://bike-nomad.com



More information about the Squeak-dev mailing list