Object: Identity vs. Environment

Joshua 'Schwa' Gargus schwa at cc.gatech.edu
Sat Jun 7 17:39:46 UTC 2003


On Sat, Jun 07, 2003 at 09:52:37AM -0700, Joel Shellman wrote:
<snip>
> How do you respond to the problem of inheritance? Having to traverse up the
> inheritance hierarchy seems way too expensive to me,

Are you talking about traversing up the hierarchy to find the proper method
when a message is sent?  This seldom happens (< 5% of the time), since recently
invoked methods are cached at each call site.

> and lacks flexbility.
> In fact, that proposal seems to be nearly indistinguishable from using
> #respondsTo. The "agreed upon symbol" would be a certain method. It's the
> same thing.
> 
> What I am curious to know is why noone has discussed the idea of simply
> handling DNU exceptions if #isFoo isn't there. Why not? That seems to make
> some sense to me. I don't understand smalltalk exception handling, though,
> so I think I'll read up on that this morning.

Because Smalltalkers tend to take naming of things seriously.  There
are many DNU hacks that can be done for many purposes, but if there is
another way, it is better to avoid polluting the "does not understand"
concept by using it for messages that the object actually does
understand.

Joshua

> 
> -joel
> 



More information about the Squeak-dev mailing list