Re: RFC 308 (v1) Ban Perl hooks into regexes

2000-09-28 Thread Tom Christiansen
I consider recursive regexps very useful: $a = qr{ (? [^()]+ ) | \( (??{ $a }) \) }; Yes, they're "useful", but darned tricky sometimes, and in ways other than simple regex-related stuff. For example, consider what happens if you do my $regex = qr{ (? [^()]+ ) | \( (??{ $regex }) \)

Re: RFC 308 (v1) Ban Perl hooks into regexes

2000-09-28 Thread Hugo
In [EMAIL PROTECTED], Tom Christiansen writes: :I consider recursive regexps very useful: : : $a = qr{ (? [^()]+ ) | \( (??{ $a }) \) }; : :Yes, they're "useful", but darned tricky sometimes, and in :ways other than simple regex-related stuff. For example, :consider what happens if you do :

Re: RFC 331 (v1) Consolidate the $1 and C\1 notations

2000-09-28 Thread Jonathan Scott Duff
On Thu, Sep 28, 2000 at 08:57:39PM -, Perl6 RFC Librarian wrote: ${P1} means what $1 currently means (first match in last regex) I'm sorry that I don't have anything more constructive to say than "ick", but ... Ick. Well, maybe I do. Forget $P1. If the user wanted $1 from the previous

Re: is \1 vs $1 a necessary distinction?

2000-09-28 Thread Bart Lateur
On Wed, 27 Sep 2000 10:34:48 -0500, Jonathan Scott Duff wrote: If $1 could be made to work properly on the LHS of s///, I'd vote for that being The Way. I disagree, because \1 is different from a variable $foo in at least two ways: * $foo is compiled into /$foo/ before anything is matched. \1

Re: RFC 331 (v1) Consolidate the $1 and C\1 notations

2000-09-28 Thread Hugo
:=item * :/(foo)_$1_bar/ : :=item * :/(foo)_C\1_bar/ Please don't do this: write C/(foo)_\1_bar/ or /(foo)_\1_bar/, but don't insert C in the middle: that makes it much more difficult to read. :mean different things: the second will match 'foo_foo_bar', while the :first will match

Re: RFC 332 (v1) Regex: Make /$/ equivalent to /\z/ under the '/s' modifier

2000-09-28 Thread Hugo
In [EMAIL PROTECTED], Bart Lateur writes: :I'll try to find that "thread" back. This was my message: http://www.mail-archive.com/perl6-language-regex%40perl.org/msg00354.html :I don't think changing /s is the right solution. I think this will :incline people to try and fix their problems by

Re: RFC 332 (v1) Regex: Make /$/ equivalent to /\z/ under the '/s' modifier

2000-09-28 Thread Nathan Wiger
Is $$ the only alternative, or did I miss more? I don't think I've even seen this $$ mentioned before? $$ is not a suitable alternative. It already means the current process ID. It really cannot be messed with. And ${$} is identical to $$ by definition. I still like the idea of $$, as I

Re: RFC 331 (v1) Consolidate the $1 and C\1 notations

2000-09-28 Thread Nathan Wiger
=item * C\1 goes away as a special form =item * $1 means what C\1 currently means (first match in this regex) =item * ${1} is the same as $1 (first match in this regex) =item * ${P1} means what $1 currently means (first match in last regex) Here's the big problem with this, and I