Hi,

In message "Re: adding overload to ruby"
    on 02/09/27, "Bulat Ziganshin" <bulatz / integ.ru> writes:

|YM>   * multiple method (as in CLOS, Dylan) does not fit in Ruby at all.
|
|can you please give me an example? i know many languages but
|clos/dylan not in this list

(defmethod (plus (integer x) (integer y))
   ....)

(defmethod (plus (float x) (integer y)
   ....)

(plus a b)   ; invokes plus method depends on classes of a AND b

In multiple method, there's no one specific receiver.  Every argument
is a part of receivers.

|YM>   * but still, it's a big change to the language, so that we better be
|YM>     conservative.
|
|we prefer to make small changes in language which give large impact on
|easy of programming. and because this discussion arrived. but i personally
|don't see at this moment something better than my first shoot
|(syntactic sugar about overload.rb and using '===')

A small change can destory the total balance.  I didn't say "no".
Just "wait".

|YM>   * besides, dispatch-on-type often is code smell (sign of bad code).
|YM>     I'm still not sure whether it is good to encourage this practice
|YM>     by supporting it by the language.
|
|it's intensively used already. as i stated above, first examined class - Array -
|has 10% of functions overloaded. coerce is another bad side of current
|ruby implementation

 (a) 10% usage does not mean it is good enough to encourage.  It is
     mostly because of performance compromise.

 (b) coerce is difficult, but very few programmers need to hack
     numeric coerce, so it doesn't matter much if it's good or bad.

							matz.