> Date: Tue, 03 Dec 2002 18:39:27 -0500 > From: James Mastros <[EMAIL PROTECTED]> > > Huh? In that case, somebody should tell Angel Faus; "Numeric literals, > take 3" says 0c777, and nobody disented. IIRC, in fact, nobody's > descented to 0c777 since it was first suggested.
Well, except Larry. I remember him saying initially that it should be 0o777, not just in the most recent one. I'm not much of a thread scaveneger, so I can't point you to the message. > > (But since I assume you can use \d, \b, \h anywhere you use \o, you > > won't have to use octal at all if you don't want to.) > \d is pure speculation on my part. (As is \0 == chr(0).) > > p6l guys and the Design Team, if you havn't been following the > conversation, here's how it goes: > In perl5, octal numbers are specified as 0101 -- with a leading zero, > and octal characters in strings are specified as "\0101". In perl6, our > current documentation lists 0c101 as being the new way to write octal > numbers, because it lets people use leading zeros in numbers in an > intuitive way, and 0o101 was decided to be too difficult to read. The > last writing of Larry to address this, as far as I (or anybody else who > I've noticed) knows, says 0o101. > > It's generaly been agreed on, I think, that 0c101 is the way to go. I get a different impression. I think it's generally a non-controversial topic, and nobody really cares either way... aside from you, perhaps. > Now, we're working on string literals, and the question is how we write > octal character literals. The current writer of the string literal spec > wants "\o101" to be the new way to write what is "\101" in perl5 (and > C). I'd prefer this to be "\c101", to match up with how the current doc > says octal numerics are written. Unfornatly, \c is taken for > control-characters (ie "\c[" eq chr(ord '[' - 64) eq ESC), which is a > more important use of \c. > > What do we do, oh great and wonderful design team? > > Numeric String Upside Downside > ------- ------ ------ -------- > 0101 \101 p5/C compatable Unintutive > 0o101 \o101 Consistent Hard to read Not that I'm "great and wonderful design team," but this one is my favorite. I don't think 0o101 is terribly hard to read, and "o" stands for "octal" a lot better than "c" does. That comes back in reading, too. Once people figure out that's the letter "o", and not a miniature zero, it will be perfectly clear what is meant. That's not true of "c". Luke