From: Gavin Sinclair Date: 2002-09-29T18:47:18+09:00 Subject: Re: thoughts on typelessness ----- Original Message ----- From: "ts" > >>>>> "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 This is questionable; depends what you mean. An Enumerable also responds to :grep, :sort, etc., according to 'ri'. And "class X; def each end; end" responds to "each", but is not Enumerable. And of course, you can "include Enumerable" without even implementing #each! And you can take an Enumerable object (say, anArray) and undefine #each. What becomes of your method signatures in all these cases? [code, though interesting, snipped] > Guy Decoux Gavin