On Sat, Nov 17, 2012 at 1:40 AM, Carlo E. Prelz <fluido / fluido.as> wrote:
> In all cases, I would not use the exception mechanism in the example
> that the original poster makes. Rather, the BankAccount#withdraw
> method would return true (or possibly the new balance of the account)
> if the withdraw method was successful, and false otherwise. Ruby has a
> neat syntax for catching false/nil values:

One of the things I *really* like about Ruby is that false is *not*
the same as nil or zero. Thus returning false from a method is
something the calling code can actually get a handle on, unlike in
other languages (such as C, perl, etc) where false is overloading
zero, which might be a legitimate return value.

> This is just an effort to put into words my craft. Every other
> craftsman/woman will most probably follow different ways.

> Carlo

Thanks, Carlo, that was an excellent desciription, and mirrors my
thoughts as well.