On Saturday, January 18, 2003, 8:35:10 AM, dblack wrote:

> For me there are two problems with the exception-wrapping idiom:
> speed, and the absence of an exception which precisely and uniquely
> corresponds to "this object did not respond to that message."
> NameError can represent a case where the method got called but,
> itself, tried to call a non-existent method on an object.


I don't entirely disagree, but "welcome to the world of exception
handling!"

Something within me rejects the notion that code should be designed to
call random methods and handle the case where they don't exist. But
I've been surprised many times by the clever and unique things that
people make Ruby do, and I'm eager to be surprised again.

e.g. I've been fascinated beyond belief reading about mock objects,
and their super-elegant implementation in Ruby.  Hooray for people
with more imagination than me!

Gavin