From: Austin Ziegler Date: 2005-12-11T23:07:13+09:00 Subject: Re: lib for optional static typing On 11/12/05, gabriele renzi wrote: > Oh, the nicety of > def Math.sqrt(Positive p) > :) Hm. No. That would end up requiring a significant change to Ruby, because sqrt is legal on negative numbers, as long as you have imaginary (complex) number support available. So you would then have to have overloading instead of simple overriding as Ruby currently does, because you'd need def Math.sqrt(Positive p) and def Math.sqrt(Negative p). Overloading, I have come to believe, is a nightmare compared to duck-typing. That's one of the reasons I oppose *anything* that threatens to put it into Ruby, because it's a mess. -austin -- Austin Ziegler * halostatue@gmail.com * Alternate: austin@halostatue.ca