On Sat, Apr 01, 2006 at 08:02:54PM +0900, Pit Capitain wrote: > APURI Furuhashi schrieb: > >[ruby-dev:28533] Multi Methods > > > > URABE Shyouhei proposed a rough idea for multi methods (in lisp as > > generic function) for ruby > > The syntax is > > def foo( SPEC val) > > SPEC is any object which respond to "===". > > This allow multiple dispatch class based or like eql? specializer in > > lisp. > > > > But if ther is not a matching SPEC beetween all methods it is still > > called, for duck typing. > > Matz said he agrees and this can be committed to 1.9 if it is > > fast implementation. > > Will there be a defined sequence for calling the "===" methods? > > If there are multiple matching definitions, which one(s) would be called? See http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-dev/28533 (and the Date: header) -- Mauricio Fernandez - http://eigenclass.org - singular Ruby