Re: int(0x123) == int(0x123) ?

2005-03-20 Thread Autrijus Tang
On Tue, Mar 15, 2005 at 11:14:07AM -0800, Larry Wall wrote: On Wed, Mar 16, 2005 at 02:57:36AM +0800, Autrijus Tang wrote: : So, between the two consistencies, do you think that the more DWIMmy : one of parsing 0o123 is more helpful? I'll implement it tomorrow : if that's the case. :) Yes,

Re: int(0x123) == int(0x123) ?

2005-03-16 Thread James Mastros
Larry Wall wrote: And we might even allow exponents on 0x et al., though what radix the exponent is assumed to be is an interesting question, though. Well, the perl6-documentation guys tried to hash this out, but were hampered by a lack of both bits that effected the bits that we were trying to

int(0x123) == int(0x123) ?

2005-03-15 Thread Autrijus Tang
Currently Pugs numifies hexadecimal and octal strings as if they are literals; that means 0x123 and 0o456 all work as expected. Is that an acceptable treatment? What about Inf and NaN in numeric context? Thanks, /Autrijus/ pgp11vtHJMLL9.pgp Description: PGP signature

Re: int(0x123) == int(0x123) ?

2005-03-15 Thread Luke Palmer
Autrijus Tang writes: Currently Pugs numifies hexadecimal and octal strings as if they are literals; that means 0x123 and 0o456 all work as expected. Is that an acceptable treatment? What about Inf and NaN in numeric context? If we follow Perl 5's lead, they all numify to zero (generalizing

Re: int(0x123) == int(0x123) ?

2005-03-15 Thread Patrick R. Michaud
On Tue, Mar 15, 2005 at 08:35:54AM -0700, Luke Palmer wrote: Autrijus Tang writes: Currently Pugs numifies hexadecimal and octal strings as if they are literals; that means 0x123 and 0o456 all work as expected. Is that an acceptable treatment? What about Inf and NaN in numeric context?

Re: int(0x123) == int(0x123) ?

2005-03-15 Thread Larry Wall
On Tue, Mar 15, 2005 at 11:09:11PM +0800, Autrijus Tang wrote: : Currently Pugs numifies hexadecimal and octal strings as if they : are literals; that means 0x123 and 0o456 all work as expected. : Is that an acceptable treatment? It's okay by me. The restriction on not autoconverting hex and

Re: int(0x123) == int(0x123) ?

2005-03-15 Thread Autrijus Tang
On Tue, Mar 15, 2005 at 10:43:07AM -0800, Larry Wall wrote: On Tue, Mar 15, 2005 at 11:09:11PM +0800, Autrijus Tang wrote: : Currently Pugs numifies hexadecimal and octal strings as if they : are literals; that means 0x123 and 0o456 all work as expected. : Is that an acceptable treatment?

Re: int(0x123) == int(0x123) ?

2005-03-15 Thread Larry Wall
On Wed, Mar 16, 2005 at 02:57:36AM +0800, Autrijus Tang wrote: : So, between the two consistencies, do you think that the more DWIMmy : one of parsing 0o123 is more helpful? I'll implement it tomorrow : if that's the case. :) Yes, I do. That was one of the main reasons for switching to the less