How do you define "object-oriented"?

Henrik Gedenryd h.gedenryd at open.ac.uk
Fri May 3 10:13:00 UTC 2002


Alan Kay wrote:

> There were some suggestions that a "prereceive" method be
> allowed in ST-76 and -80 -- if present, a flag would be set somewhere
> efficient, and it would be called first with the actual message put
> in a place where it could be received later. This would have allowed
> all of these schemes, delegation, etc., to also be done in the later
> versions of ST. Someone on the list might want to figure out good
> ways to do these schemes in Squeak. Folks like Nathanial Scharli and
> Stephane, who are playing with metasystems, should add these kinds of
> considerations into their play.

I've thought of a similar scheme where a similar message is sent only if a
method is not found in the receiver's own local method dictionary (alt. in
the whole superclass chain--you can use doesNotUnderstand: to similar
effect). Then you can do whatever you need to find/build the method to be
used. That way you can also cache methods that you've thus found/built by
putting them in the local MethodDict. These two things allow you to cut down
the number of times the expensive method find/build call has to be performed
when it isn't needed.

Henrik




More information about the Squeak-dev mailing list