On 5/5/05, John Carter <john.carter / tait.co.nz> wrote: > On Fri, 6 May 2005, Hal Fulton wrote: >> First of all, I sympathize on some level with this RCR. It has >> been thought of before, by me and others. >> >> In fact, I *think* that this was Ruby's default behavior once >> upon a time; and I think it was changed for a good reason(s) I >> don't recall. > Be careful about exactly what is being asked for and what has been > done before. I once developed an OOP system were all objects would > respond to all undefined messages by doing nothing. I rapidly > changed that to an error condition as in that case the complaint > that it hid bugs was valid. Right. But why should I have to make that change for just about any application that I end up writing? There are a lot of cases where nil can arise -- and if it does arise, it may be incorrect. Do you *want* to give me RSI by forcing me to do: foo.bar unless foo.nil? Sorry, but the current behaviour is more correct. > What I'm asking for here is that just the nil object, not even > the false object, responds to all undefined methods by doing > nothing and returning nil. But nil isn't an Anything object, it's nothing. It shouldn't respond to things that it doesn't know about. If you want nil as a null object, use a module to extend the behaviour -- but don't be surprised if a lot of programs start dying for unclear reasons. -austin -- Austin Ziegler * halostatue / gmail.com * Alternate: austin / halostatue.ca