From: Christoph Date: 2002-09-12T04:37:58+09:00 Subject: Re: Multimethods (was Re: Larry Wall's comments on Ruby) "Hal E. Fulton" wrote in .... > Do people really consider that a "multiple-receiver" > model?? > > I had envisioned some kind of bizarre framework > where you could do (obj1,obj2).method in an > order-independent fashion. What you are talking about is called symmetric dispatch - interestingly enough even so it is easy to cook up a notion of anti-symmetric dispatch that could handle arithmetic binary operator ``-'' I could not find a single google hit on the subject. Anyway the two subject are not necessarily distinct. One can imagine a system were obj1 + obj2 is equivalent to the (symmetric if you like) dispatched version (obj1, obj2).add > > In any case, I wouldn't favor adding this to Ruby, > as variables have no types; and thus how do you > define a method "signature"? Well in the given case the signature would be zero - the crucial point is that (obj1,obj2) would not be an ordinary object but a (possible symmetric) double or bi-object with a (symmetric) bi-type. Note however that I am not even sure if such a system has ever been implemented in a languages (like Ruby) were classes (types) live within the Objectspace (are ``real'' objects). Anyway I would be quite happy with a trail balloon using more conventional multiple-dispatch. .... /Christoph