Since octals are less important than they used to be in PDP-11 days, Perl 6 is changing octals to be consistent with hex notation: you have to say 0o777 instead of 0777. (Or use the general radix form, 8:777.) | [reply] |
The thing about it is that the rest of computerdom interprets 0777 as an octal number. I'm not saying that what's happening here is bad, but I don't understand the drive break convention.
thor
Feel the white light, the light within
Be your own disciple, fan the sparks of will
For all of us waiting, your kingdom will come
| [reply] |
There is no drive to break convention. There is only the drive to Do It Right this time, which incidentally breaks convention where convention is suboptimal. But all other things being equal, we'll still pick the conventional solution, or something close to it. Often, however, there are several conflicting conventions to pick from.
In this case, leading zero meaning octal is originally only a Unix convention, not a computerdom convention, and it's a bad convention because the Real World uses leading zeroes on decimal numbers all the time. Why just this morning my daughter was pissed off at a Web form that required her to specify the month as 09 rather than 9. Stupid, but that's the way the Real World thinks...
| [reply] |
| [reply] |
Quoting from S02:
Initial 0 no longer indicates octal numbers. You must use an explicit radix marker for that. Pre-defined radix prefixes include:
0b base 2, digits 0..1
0o base 8, digits 0..7
0d base 10, digits 0..9
0x base 16, digits 0..9,a..f (case insensitive)
| [reply] |