From: Gary Wright Date: 2011-02-01T00:00:00+09:00 Subject: Re: why is overloading invalid in ruby. On Jan 31, 2011, at 5:16 AM, Shadowfirebird wrote: > Or, indeed, the practical case - at the very heart of Ruby is the idea of duck typing. Duck typing rules out method overloading, because parameters would have to have set types before you could have a signature. Presumably no-one is suggesting that we should have fixed typing in Ruby? > I think the original poster provided an example of overloading based on the number of parameters but not their type. Even restricting yourself to overloading by arity is a bit problematic in Ruby because the arity still has to be determined (in some cases) dynamically: args = [1,2] foo(*args) # two arguments args << 3 foo(*args) # three arguments Gary Wright