On Thu, Oct 20, 2005 at 05:12:32PM -0700, Nate Wiger wrote:
> Every regex engine in every language uses $1 or \1. This includes Java,
> JavaScript, C, PHP, Python, awk, sed, the GNU regex libs, etc. Somehow
> other languages seem ok with this, because it's a widely-used convention.
This quibbling over $0 and $1 seems like rampant bikeshedding to me.
Given that @Larry has said that $0, $1, etc. correspond to $/[0], $/[1],
etc, if you want to keep $1 as the "first parenthesized part", then come
up with a compelling, concrete proposal for what to do with $/[0] (and
$0) keeping in mind that
@array = /(foo)(bar)(baz)/;
has to do the right thing.
> That's not my wish; just that it's time to take "another look" at the
> list of changes to see where the real-world benefit is.
IMHO, self consistency is far and away more important than consistency
with perl5.
> If Perl 6 is going to be successful, this means it must change the
> fewest key things with the most benefits. This may mean some things that
> "aren't quite perfect" still don't get changed. (It also means lots of
> new stuff can still be added - I'm just talking change.)
I don't understand this. Change the fewest "key things" relative to
what? Perl5? If so, why? Is it not enough that perl5 programs will
still compile and run under perl6?
> Just food for thought... maybe I'm wrong...
I don't know about wrong, but you're certainly entering the game a
little late.
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]