On Mon, Nov 07, 2005 at 10:51:59AM -0600, Patrick R. Michaud wrote: : In p6rules, how should specify characters (glyphs, bytes, whatever) : using octal notation? : : Currently S02 says that integer constants in octal are written with : as "0o" prefix (as in 0o123), just as we would use the "0x" prefix : to specify integers using base-16. : : It doesn't seem to be written anywhere, but I think it's assumed : that in string literals one would use "\o123", just as we use : "\x0a".
That should certainly be permissible even if we don't force it. And I suspect we should force it. Probably \0123 needs to be completely illegal, at least for a decade or two, so we can let our descendents decide what it should mean. : Should rules work the same -- i.e., use "\o123" to specify a : character (glyph, byte, whatever) using octal notation? I believe so. : And are we officially eliminating the \nnn notation from rules : and string literals? This seems to be implied by Larry's post at : http://www.nntp.perl.org/group/perl.perl6.language/19385 , but : several items in that thread seem to have been dropped without : a final resolution, or at least haven't made it into a design : document. I currently think that, given current trends toward installing whitespace between tokens, we can reasonably allow \d123 for decimal and require people to say \d 123 if they mean a digit followed by 123. Of course, we then have a little problem under :w, which we can solve with \d<null>123. Maybe <> is short for <null>, and you can write \d<>123. Though there's always [\d]123 too, which oddly enough is the same as <+[\d]>123 in this case. I wonder how often people would be fooled into thinking [\d] is a character class... : It's worth noting that both S05 and A05 make use of the traditional : \nnn notation in descriptions, and we probably need to update these : to bring them in line with whatever decision is made. Yes. By the way, found an interesting bug in pugs that might or might not be related: say +'0012' prints 0. Should print 12. If someone with time and a commit bit wants to install a test, I'd be obliged. Larry