From: Daniel Nugent Date: 2006-04-02T11:23:12+09:00 Subject: Re: Typed Parameters Hrm... I see, however, effective multi-dispatch would still be possible with only around calls. Simply make the public method a dummy: def public_dummy(*args);end.around do |*args| SOME_ARGUMENT_CONDITION CODE when CONDITION 1 real_method_1 when CONDITION 2 real_method_2 else real_method_general end end And, I would say that this is perfectly acceptable because the number of times you actually NEED multi-methods in Ruby is going to be pretty small. On 4/1/06, Trans wrote: > > Daniel Nugent wrote: > > Actually... now that I'm looking about it, that's kinda dumb, we might > > as well just add pre, post, and around calls so we can more cleanly > > seperate the Type and condition checks from the actual method. > > No, it's not so dumb actually. A system like the one you propose could > be used for multi-dispatch --mere method wraps could not, they'd just > be a more formal way of doing what we already must do using case > statments. > > I actually wrote a system much like teh one you propose called > LightType, it was based on the Euphoria language's type system. Hmm... > at the time I didn't hink of using multi-dispatch with it. Since I > recently wrote a working overload method maybe I'll revist the > possibility. > > T. > > > -- -Dan Nugent Don't Feel Like Typing? Send me a voicemail: http://odeo.com/sendmeamessage/DanNugent