From: Justin Johnson Date: 2002-09-26T18:44:47+09:00 Subject: Re: adding overload to ruby > in the same way as does overload.rb - auto-creating typeless > dispatcher Could you explain this a little more please? -- Justin Johnson "Bulat Ziganshin" wrote in message news:14683451306.20020926090341@integ.ru... > Hello Justin, > > Wednesday, September 25, 2002, 6:02:55 PM, you wrote: > > > >> not class, but any expression - we can use === to test > > >> def a_method( Integer a) > >> end > >> > >> def b_method( Numeric a) > >> end > > JJ> Yes, I thought of this. This means however that the lookup needs to work > JJ> with class hierarchies: > > blin! i suggest use '===' for all cases > > >> no. if the method definition don't use type specifiers, this method is > >> not overloaded. as with overload.rb > > JJ> Ok, but how does the runtime know wether a method call is overloaded at the > JJ> point of call? > > in the same way as does overload.rb - auto-creating typeless > dispatcher > > -- > Best regards, > Bulat mailto:bulatz@integ.ru > >