From: Dave Thomas Date: 2002-10-02T00:07:43+09:00 Subject: Re: thoughts on typelessness William Djaja Tjokroaminata writes: > Really, I want the 'rate' and 'delay' to be of class Float and nothing > else. > Can you provide some idea on how to better deal with user input error > using probably some Ruby paradigm? 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. Cheers Dave