develooper Front page | perl.perl6.language | Postings from October 2001

Re: NaN+NaNi

Thread Previous | Thread Next
RaFaL Pocztarski
October 11, 2001 17:53
Re: NaN+NaNi
Message ID:
Aaron Sherman wrote:

> For example, zero-filled numbers are not converted to octal because
> many text files contain zero-filled numbers.
> The idea that "0cat" is "0", but "0xat" is 10 will confuse a lot of folk.

It all should be at least possible to do, but not mandatory.

> If strings in numeric context are treated the same way as the parser
> would, then I think there need to be warnings for trailing garbage.

There's already a warning for that.

> No, I think if you want "10_000" to be 10000, you can always
> eval it, but I don't think anyone reading in text should expect
> that.

I don't think that evaling input should be the best solution. In all of
those proposition, the underscore seems to be the simplest and the less
ambiguous one.

- RaFaL Pocztarski,

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About