On Mon, Apr 19, 2010 at 1:53 PM, Derek C.
[email protected] wrote:
How do Ruby programmers handle method overloading?
ruby programmers do not need it
In Java, I could easily create several methods of the same name that accept a variety of
maybe java people need it
I know in Ruby, using *args you can accept an unlimited number of
parameters. Do I just this with a series of if statements?
no. you’re doing it like in static languages.
Or is there a common way Ruby programmers handle this?
it comes natural when you are object-oriented. there will be no need
for overload. you wont even think about it.
maybe you could show us a sample use case of method overloading since
i cannot think of one right now
best regards -botp