Subject: Re: elegant way to say "try this thing, one at a time, until condition is met"
From: David Garamond <lists zara.6.isreserved.com>
Date: Tue, 1 Jun 2004 22:07:53 +0900
References: 101855101859101876101902101932101974101978
In-reply-to: 101978

Robert Klemme wrote:
>>Thankfully in Ruby
>>things are simplified: nil and false values are always false, everything
>>else is true.
Alas, I actually didn't even think about C when writing this :-) Was
comparing it to Python, PHP, Perl, etc. on my mind.
>>From a certain point of view you could say that Ruby is more complicated
> than C since it has two values meaning 'false' where C has only one. The
> fact that all objects can occur in a boolean context just saves you some
> explicit conversions you'd have to do in other languages.
--
dave