On Wed, 23 Feb 2005 00:32:02 +0900, Kaspar Schiess <eule / space.ch> wrote:
> I can't see why this method should be added to all of Ruby.. it seems to
> apply to a special case you need to handle. You know, it is perfectly ok to
> change stdlib just for your project... this is what Ruby is about.
> 
> I feel very at home with the distinction between empty and nil that is made
> currently. In the case of financial data that may have empty cells I would
> propose to add a small class layer between that has an empty? method.. thus
> solving the problem in an app specific way and not changing the language.

This, or something like it, would be useful for the case where I have to do:

  foo if bar.nil? or bar.empty?
  foo(bar) if bar and not bar.empty?

It's not common, but it is common enough. I want to sometimes write it as:

  foo if bar.empty?

...because for the purposes of what I'm doing (I think that this is in
Text::Format), +nil+ is as good as empty.

-austin
-- 
Austin Ziegler * halostatue / gmail.com
               * Alternate: austin / halostatue.ca