Re: NaN+NaNi

2001-10-11 Thread RaFaL Pocztarski
Jonathan Scott Duff wrote: > It's bothered me that I can write 100_000 in my perl code, but if I have > a string "100_000" it'll evaluate to 100 when numerified. It would be > really weird if "10indigo" became 10i, "1e3foobar" became 1000, and > "10_000" became 10 in Perl 6 IMHO. That should be

Re: NaN+NaNi

2001-10-11 Thread RaFaL Pocztarski
Glenn Linderman wrote: > On the other hand, there is a case to be made that any form of number that > might get printed by perl's unformatted i.e. > > print 0+$var > > should be reconvertible back to a string via implicit numeric conversions of > strings. I think the only thing that would af

Re: NaN+NaNi

2001-10-11 Thread RaFaL Pocztarski
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 nu

Re: NaN+NaNi

2001-10-11 Thread RaFaL Pocztarski
raptor wrote: > | It's bothered me that I can write 100_000 in my perl code, but if I have > | a string "100_000" it'll evaluate to 100 when numerified. It would be > | really weird if "10indigo" became 10i, "1e3foobar" became 1000, and > | "10_000" became 10 in Perl 6 IMHO. > > ]- Agree if u wan

Re: NaN+NaNi

2001-10-11 Thread RaFaL Pocztarski
(sorry, I posted it before I finished...) Dan Sugalski wrote: > Sure. 5 + 10i will probably evaluate to "5" + "10i" and just get > constant-folded at compile time. ;) That's good to know. :) > >I don't think that imaginary numbers should have > >their own class, like real ones have. > > If we

Re: NaN+NaNi

2001-10-11 Thread RaFaL Pocztarski
Dan Sugalski wrote: > At 01:27 PM 10/11/2001 +0200, RaFaL Pocztarski wrote: > >David Nicol wrote: > > > > > RaFaL Pocztarski wrote: > > > > > > > > First this thread tells me that "123foo" will be 123 in numeric > > > > > context. Now I find myself wondering what "123indigo" evaluates > > > > > t

Re: NaN+NaNi

2001-10-11 Thread Glenn Linderman
Aaron Sherman wrote: > > It's bothered me that I can write 100_000 in my perl code, but if I have > > a string "100_000" it'll evaluate to 100 when numerified. It would be > > really weird if "10indigo" became 10i, "1e3foobar" became 1000, and > > "10_000" became 10 in Perl 6 IMHO. Note that in

Re: NaN+NaNi

2001-10-11 Thread Jonathan Scott Duff
On Thu, Oct 11, 2001 at 01:26:12PM -0400, Aaron Sherman wrote: > No, I think if you want "10_000" to be 1, you can always > eval it, but I don't think anyone reading in text should expect > that. I'll agree as long as we make the string "1e2foo" evaluate to 1 in a numeric context rather than

Re: NaN+NaNi

2001-10-11 Thread Aaron Sherman
On Thu, Oct 11, 2001 at 10:28:34AM -0500, Jonathan Scott Duff wrote: > On Thu, Oct 11, 2001 at 11:13:59AM -0400, Dan Sugalski wrote: > > As for more complex string literals evaluating to numbers, I think that's > > something best left to either a user-written sub, or user-written fancy > > parse

Re: NaN+NaNi

2001-10-11 Thread raptor
| > As for more complex string literals evaluating to numbers, I think that's | > something best left to either a user-written sub, or user-written fancy | > parser hacks. Up to Larry whether it goes in the base language, but I think | > I'd prefer not. | | Speaking of string turning into numbers

Re: NaN+NaNi

2001-10-11 Thread Jonathan Scott Duff
On Thu, Oct 11, 2001 at 11:13:59AM -0400, Dan Sugalski wrote: > As for more complex string literals evaluating to numbers, I think that's > something best left to either a user-written sub, or user-written fancy > parser hacks. Up to Larry whether it goes in the base language, but I think > I'd

Re: NaN+NaNi

2001-10-11 Thread Dan Sugalski
At 01:27 PM 10/11/2001 +0200, RaFaL Pocztarski wrote: >David Nicol wrote: > > > RaFaL Pocztarski wrote: > > > > > > First this thread tells me that "123foo" will be 123 in numeric > > > > context. Now I find myself wondering what "123indigo" evaluates > > > > to! > > > > Also 123. I think that co

Re: NaN+NaNi

2001-10-11 Thread RaFaL Pocztarski
David Nicol wrote: > RaFaL Pocztarski wrote: > > > > First this thread tells me that "123foo" will be 123 in numeric > > > context. Now I find myself wondering what "123indigo" evaluates > > > to! > > Also 123. I think that complex numbers, if happening automatically, > would only match > >