From: patrick-may@... (Patrick May) Date: 2002-09-13T07:41:20+09:00 Subject: Re: not grasping the method overloading/multi-dispatch thing A friend pointed out one major plus to static typing: documentation of argument types. This feature seems to be envy of that plus. dblack@candle.superlink.net wrote in message news:... > Right, but that's the part I don't get :-) I'm picturing things like: > > def meth(Integer n, String s) > ... > def meth(Float f, String s) > ... > > and somewhere along the line I'm not clear on how that fits into the > spirit/design/philosophy of Ruby. Dave, I'm inclined to agree with you. A major utility of Ruby is that you can pass something that the original coder *didn't* anticipate, as long as it responds to the appropriate messages. Given the example above, a guarding .to_f or .to_i within :meth does the job while being more flexible. The guarding conversion would let one pass in a string from a CGI param, for example. So.... I think the benefit people are looking for is the documentation benefit -- this method expects a string, etc. There are easier ways of solving documetation problems, like making rdoc a standard library :-) ~ Patrick