From: Gavin Sinclair Date: 2002-09-27T23:02:33+09:00 Subject: Re: adding overload to ruby ----- Original Message ----- From: > > What about this? ;) > > def do_foo(b {b.respond_to?(:sort) && b.respond_to?(:bar)}) > end Why, it's beautiful! Why do we even need this? It is a manual procedure to specify what the parameters must respond to, whereas the interpreter will find out soon enough what it needs to do. (i.e. it will raise error if the object passed in doesn't respond to the methods that are actually used.) It would perhaps be useful if rdoc could tell us what methods the parameters need to respond to, but I hardly think it's an urgent issue. > -- > Nobu Nakada Gavin