Object: Identity vs. Environment
Richard A. O'Keefe
ok at cs.otago.ac.nz
Tue Jun 10 04:11:14 UTC 2003
Joel Shellman <joel at ikestrel.com> wrote:
But you just said in your other email that isWebBrowser should
not be in Object.
True.
If that is the case, than if you call
isWebBrowser there will be a chance you'll get an MNU.
False. When I write
(aCollection size + 1) * 2
there isn't the slightest point in wrapping an exception handler
around it, even though #+ is not defined in Object.
In fact, I've just sent a message in this thread which shows that
we don't need #isWebBrowser _at all_.
Why not just assume that what you have is what you expect and
just send the message you expect it to support and not bother
with any #isFoo call at all? That's my missing suggestion #5
that I've bee pondering a little lately.
But, but, but, that's what people already DO.
The #isFoo calls are there for the cases where what people *expect*
includes objects that do support a particular protocol AND ALSO
objects that don't. When you are only expecting objects that do
support the protocol, OF COURSE you don't call #isFoo.
Here I stopped reading. Here I end my contributions to this thread.
More information about the Squeak-dev
mailing list
|