Re: Help! Strings -> Numbers

[email protected] (Michael Lazzaro) Wed, 20 Nov 2002 10:05:38 -0800
Newsgroups perl.perl6.documentation
Message-ID <[email protected]>
On Tuesday, November 19, 2002, at 06:34  PM, Larry Wall wrote:
> On Tue, Nov 19, 2002 at 10:59:02AM -0800, Michael Lazzaro wrote:
> : (A) Unification of Literal <--> Stringified Numeric Behaviors
> :
> :     0123   == "0123"
> :     0xff   == "0xff"
> :     20#1gj == "20#1gj"
> :     1e10   == "1e10"
> :
> : .... in the interest of regularity, flexibility, etc.  Comments?
>
> This is impossible unless we do away with 0123.  There are too many
> leading 0's in the decimal world.  On the other hand, 0x is unlikely
> to occur by accident.

So can we pull that trigger?  Seriously, 0123 as octal seems like a 
poster child for weird archaic behaviors, given the frequency with 
which leading 0's happen in the rest of the world and the obvious 
utility of understanding them as Not-Octal-Dammit.

Is there any use for which it is a necessity (chmod, obviously), and 
for which 0c123, 0o123, or 8:123 would not be a sufficient replacement?

MikeL