From: Su Zhang Date: 2011-01-18T10:09:40+09:00 Subject: Re: Why Ruby Does Not Support Method Overloading? Method overloading is ideally a feature only for statically typed language, in which the binding of method names can be easily made at compile time. Function/method names as well as the statically typed formal parameters are all parts of the formal names used during early binding. However, with a dynamically typed language (especially those who have a method dispatch implementation similar to Smalltalk), only the method name is considered part of the formal message content during method dispatch (late binding). From my understanding, taking the number of arguments, runtime type of arguments or even the formal parameter names into account for message to method mapping will complicate the language implementation. This is also the reason why Ruby does not support multiple dispatch at the language level. Common-Lisp does support multiple dispatch, but it does so by including a type modifier to the arguments so that they can be checked against the actual runtime type of arguments, which, IMO, is as unpleasant as doing something like the following in a single method definition: case arg when String # ... when Symbol # ... end Like Anurag said, Ruby already has a flexible argument processing ability; it suffices our needs though in a different style. -- Posted via http://www.ruby-forum.com/.