From: Ryan Leavengood Date: 2005-05-08T02:26:37+09:00 Subject: Re: Prove me Wrong! Re: RCR 303: nil should accept missing methods Ryan Davis wrote: > > On May 5, 2005, at 8:39 PM, John Carter wrote: > >> If I prove wrong, I will gladly retract my RCR and apologise. > > > The burden of proof (that this is needed) must sit on you, not on us > (that this is not needed). I agree. In fact, to quote http://www.adamsmith.org/logicalfallacies/000656.php "Shifting the burden of proof is a specialized form of the argumentum ad ignorantiam. It consists of putting forward an assertion without justification, on the basis that the audience must disprove it if it is to be rejected. Normally we take it that the new position must have supporting evidence or reason adduced in its favour by the person who introduces it. When we are required instead to produce arguments against it, he commits the fallacy of shifting the burden of proof." I feel this discussion has been useful, and the NullObject pattern is interesting, but I'm in the camp that this will do more harm than good. To shift the burden of proof to us only tends to deflate your own argument through logical fallacy. Most useful programs interact with other outside programs, or of course with a user. Using this pattern would cause silent errors that would frustrate users and possibly crash other applications (as in Austin Ziegler's PDF::Writer example.) If a user of some Rails application asks to see some important bit of information, and gets nothing instead, due to nil eating the "show_me_the_important_stuff" method, the user will not be happy. And the developer will have to spend time figuring out why the information was blank (which could be for any number of reasons besides the nil-monster.) Ryan