From: William Djaja Tjokroaminata Date: 2002-10-02T01:01:05+09:00 Subject: Re: thoughts on typelessness Hi Dave, It seems like a good idea and I think I learn some new Ruby paradigm. :) When I tred it, my only concern is that "a string".to_f # >> 0.0, and no runtime error Is "wibble" supposed to do more on value checking (such as zero and negative numbers)? The remaining concern then is although it does not make sense to have a link 'rate' of zero, it is perfectly acceptable to have a link 'delay' of zero. So if the user enters my_method (1e6, '100 msec') then probably my code cannot help the user much in pinpointing the source of error, if he/she then is puzzled by the resulting network simulation result (which is better than what it should be in this case). Thanks for your suggestion. Regards, Bill ============================================================================ Dave Thomas wrote: > Perhaps: > def my_method(rate, delay, ...) > wibble(rate.to_f, delay.to_f, ....) > Here you're not insisting that 'rate' and 'delay' are floats, but > instead that they can yield float values: that they can behave as > floats.