On Sun, 20 Mar 2005 02:38:50 +0900, Glenn Parker
<glenn.parker / comcast.net> wrote:
> Florian Gross wrote:
> >
> > This is by design. The destructive forms of built-in methods usually
> > return nil when they do nothing.
> 
> Yup, my bad.  I know (really!) that this is by design, but I got myself
> confused while writing such a simple reply.
> 
> For me, chaining methods is part of the Ruby way.  Sacrificing the
> ability to easily chain method! calls was a mistake, IMHO.  I still trip
> over this anomoly, and not once have I needed the functionality that
> took its place.

I've always wondered about the "return nil if unchanged".  I don't
believe I've ever used it, but I'm sure I've bumped into it a few
times where I didn't want to.

How often is this used/useful?  I can see using it as part of an 'if'
statement, just can't think of why I would.

Anybody out there using the nil return on a regular basis?  To the
point that it's worth sacrificing chaining?

-- 
Bill Guindon (aka aGorilla)