Hi --

On Fri, 17 Jan 2003, Gavin Sinclair wrote:

> On Saturday, January 18, 2003, 1:22:09 AM, Tom wrote:
>
> >> i dont know. on the my side, i like 'when NACK' idea - may be because
> >> it is close to pattern matching (in functional programming). in one
> >> program i used 3rd variant, smth like:
>
> > i agree, nack would be good. i suppose returning nil if the method doesn't
> > exist is out of the question?
>
>
> Not at all!
>
>   class Object
>     def method_missing(*hey_who_needs_arguments)
>       nil
>     end
>   end

It can be done, but it's not a general solution, because there might
be methods that do exist and still return nil.  Thus a nil return
can't be treated as an unambiguous synonym for not responding.


David

-- 
David Alan Black
home: dblack / candle.superlink.net
work: blackdav / shu.edu
Web:  http://pirate.shu.edu/~blackdav