From: ts Date: 2002-09-29T17:45:29+09:00 Subject: Re: thoughts on typelessness >>>>> "d" == dblack writes: d> I don't have any conclusive, ummm, conclusions to draw. Just d> wondering what people think of all of this. There was talk briefly of d> the idea of multi-dispatch and method signatures on respond_to? d> criteria, rather than type. Maybe that's a way to bring that more d> accessibly and concisely into the syntax. (Though I'm not sure d> exactly what that way would consist of, syntactially.) Why do you think that I've added module in the signature (see (ruby-talk:50139)) ? an enumerable is just an object which respond to #each pigeon% cat b.rb #!./ruby class A def tt(Enumerable a) p "I respond to #each : #{a.inspect}" end def tt(Kernel a) p "I don't know #each : #{a.inspect}" end end a = A.new a.tt([1, 2]) a.tt("string") a.tt(A.new) pigeon% pigeon% b.rb "I respond to #each : [1, 2]" "I respond to #each : \"string\"" "I don't know #each : #" pigeon% Guy Decoux