From: "David A. Black" Date: 2008-07-31T20:08:00+09:00 Subject: Re: How to do methodsoverloading in Hi -- On Thu, 31 Jul 2008, Shadowfirebird wrote: > I must admit that I love Ruby because it manages to combine brevity > with readability (quite a trick!). I agree. > But the brevity sort of goes out the window if every method has to > paranoidly check the class of every parameter passed to it. It's a bit > of a pain. But so is the alternative. > > I gather from what David says that there's no magic bullet...? There are two reasons not to check the class of every parameter: 1. It doesn't work, because objects aren't limited to the behavior defined in their classes. 2. It stops you from thinking more flexibly about how to leverage the power of Ruby objects, rather than smothering it. David -- Rails training from David A. Black and Ruby Power and Light: * Advancing With Rails August 18-21 Edison, NJ * Co-taught by D.A. Black and Erik Kastner See http://www.rubypal.com for details and updates!