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

Re: NaN+NaNi

Thread Previous | Thread Next
From:
RaFaL Pocztarski
Date:
October 11, 2001 17:53
Subject:
Re: NaN+NaNi
Message ID:
3BC63DB3.EBC27CE6@rfl.pl
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, admin@rfl.pl



Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About