From: dblack@... Date: 2003-01-18T22:16:11+09:00 Subject: Re: quick: it responds, it evaluates, and is not empty Hi -- On Sat, 18 Jan 2003, Gavin Sinclair wrote: > 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. Well, "random" is a bit extreme... :-) My main focus in all of this is to explore ways of making it easier and faster to do something which I think is very natural for Ruby, namely to handle situations based on the capabilities and responses of the objects present at a given point. In particular, I think part of the difficulty in trying to convince people not to rely on explicit type-checking in Ruby is that there's no really compelling, precise alternative. The double-barreled "respond_to?"/method-call is, well, double-barreled, and the exception wrapper is slow and inexact. David -- David Alan Black home: dblack@candle.superlink.net work: blackdav@shu.edu Web: http://pirate.shu.edu/~blackdav