On Friday 06 May 2005 04:27, John Carter wrote:
> A very simple and generic way of improving the reliability of Ruby
> programs is to implement the NullObject pattern by allowing nil to
> accept all and every method instead of throwing a NoMethodError.
>
> Not only does this simplify ruby programs considerably, it also
> changes certain crash bugs silently into correct programs.

I don't like it. It would hide many bugs. I want Ruby to throw an
exception when I'm ending up with something like that:

    some_var = some_method
    # some_method *should* return an IO object, but this time
    # it returned nil
    some_var.puts "important data"

It would be horribly if Ruby didn't throw an exception.

Stefan