From: patrick-may@... (Patrick May) Date: 2002-09-13T14:22:25+09:00 Subject: Re: not grasping the method overloading/multi-dispatch thing Dale Martenson wrote in message news:<20C86D2620F6D411A199009005DC0102016D1830@exchange serve.multitech.prv>... > I see this as a big advantage to the language. > > 1. Overloading doesn't break a great language. It just enhances it. Ruby > would still retain everything that makes it neat. You can already write ruby code to do everything proposed. The issue is whether such proposals deserve some sugar. That is, none of these proposals enhance the scope of what is possible, only what is encouraged. > 2. It allows for "cleaner" solutions where overloading is the "best" option. > It could be argued that overloading is needed to satisfy POLS. If Ruby is > truly the best OO language, how can it not have overloading!! :-) Overloaded methods are the same as a conditional on type. To me, this is never the best option, not when you can put methods on the class to convert it to the form you need. I'd be curious to see code that a. calls for overloading on type b. couldn't be handled by pushing code up to the classes of the argument objects > 3. If Ruby is ever to be JIT-compiled, knowing a parameters type has > advantages for performance since code can be optimized. * meat performance is always more important than metal performance. * metal performance is fine, and might get better with parrot / mono bytecode. I feel myself getting religous, so I should hush up. Hope I wasn't offensive, ~ Patrick