On Wed, May 11, 2005 at 05:48:59PM +1000, Damian Conway wrote: > Uri Guttman wrote: > > > DC> Sure. Just as $42 is a shorthand for $/[42], so too $<whatever> is a > > DC> shorthand for $/<whatever>. > > > >but then what about the different index bases for $42 and $/[42]? i > >don't think that has been resolved (nor has mixing the $1.1 and $1[1] > >syntaxes). > > Bear in mind that that reply was posted in haste, late at night, after a > long day of teaching. We're lucky it as only off by one! %-) > > But it does raise an important point: the discrepancy between $42 and > $/[41] *is* a great opportunity for off-by-on errors.
Indeed. > Previously, however, > @Larry have tossed back and forth the possibility of using $0 as the first > capture variable so that the indices of $/[0], $/[1], $/[2] match up with > the "names" of $0, $1, $2, etc. > > I think this error--unintentional, I swear!--argues strongly that internal > consistency within Perl 6 is more important than historical consistency > with Perl 5's $1, $2, $3... > > But that's only the opinion of one(@Larry), not of $Larry. My opinion too. The $<digit> vars should be zero-based just as the array indices are. (or, if we can come up with a plausible meaning for the zeroth index of our match arrays, keep starting at $1) -Scott -- Jonathan Scott Duff [EMAIL PROTECTED]