On Tue, 26 Jun 2012 17:17:29 -0400, bearophile <[email protected]> wrote:

Steven Schveighoffer:

Oh, readln includes the newline by default, so to!float is choking on that.

Similar things happen often. But Andrei says this is good, because it's more orthogonal. As Sting, I don't subscribe to this point of view. Orthogonality isn't more important than practicality.

I agree with Andrei, there is no outlet for errors in the to!T function, exception is the logical choice.

But I also agree with you that if you don't care, it should be possible to ignore the errors without the cumbersome try-catch mechanism. Something like:

to!(float, throw.No)(a)

or

toNoThrow!float(a)

-Steve

Reply via email to