Object: Identity vs. Environment

Nevin Pratt nevin at smalltalkpro.com
Sun Jun 8 03:37:22 UTC 2003



Andreas Raab wrote:

>
>Because in the one case the complexity is hidden in a single place (have you
>ever had the need to reimplement #respondsTo:?) whereas in the other there
>is a _common_ need to extend the properties in question and therefore,
>simplicity of implementation is definitely worth a few extra methods.
>
>  
>

I haven't been following this thread, but this #respondsTo: message 
caught my eye.

Anytime I (re)implement #doesNotUnderstand:, I also (re)implement 
#respondsTo:.  I treat those two messages as an inseparable pair, just 
as I treat #= and #hash as an inseparable pair.  It just bugs me when an 
object actually *can* handle a message (via #doesNotUnderstand:), and 
yet claims that it *cannot* handle it (via #respondsTo:).

Of course, I don't often (re)implement #doesNotUnderstand:

Nevin

-- 
Nevin Pratt
Bountiful Baby
http://www.bountifulbaby.com
(801) 992-3137





More information about the Squeak-dev mailing list