Max Lapshin wrote:
> Wes Gamble wrote:
>> but I'm looking for a simple explanation of why Ruby doesn't support
>> method overloading within a class to allow methods with the same name
>> but different numbers of arguments.  I understand that you can't do
> 
> You see, almost none of dynamic languages support this feature because 
> of real problems with detecting, which method to use.
> 
> class Foo
>   def methodname(x, y)
>   end
> 
>   def methodname(x, *args)
>   end
> end
> 
> Which to use in case of Foo.new.methodname(1,2) ?

Max,

Thanks, I hadn't considered that.

Wes

-- 
Posted via http://www.ruby-forum.com/.