On Mon, Nov 07, 2005 at 11:13:21AM -0800, Larry Wall wrote:
> On Mon, Nov 07, 2005 at 10:51:59AM -0600, Patrick R. Michaud wrote:
> : 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.

Now implemented as such in r9825.

> : Should rules work the same -- i.e., use "\o123" to specify a
> : character (glyph, byte, whatever) using octal notation?
> 
> I believe so.

Also implemented in r9825.

> 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.  

Ick, \d65 in a pattern looks really odd to me.  I'll register my
distaste for this one message, and then I'll have to take a stiff
drink or something before I can bring myself to implement it.  :-|

> 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.  

Having a shortcut for <?null> seems like a very good idea; it
certainly makes things a lot simpler for the optimizer.  However,
a reminder that A05 says that angles can be used as a bracketing 
construct as in C<< \x<0a> >>, so we have the situation that

    \d065      = ASCII "A"
    \d<065>    = ASCII "A"
    \d<>065    = A digit, a null, and the digits "065"

But for the :w issue, we can always solve it with the colon:

    \d:065     = A digit (cut) followed by "065"

Even with all that, I'm still not sure how I feel about \d065.

Pm

Reply via email to