>>>>> "DC" == Damian Conway <[EMAIL PROTECTED]> writes:

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

  DC> Bear in mind that that reply was posted in haste, late at night, after
  DC> a long day of teaching. We're lucky it as only off by one! %-)

  DC> But it does raise an important point: the discrepancy between $42 and
  DC> $/[41] *is* a great opportunity for off-by-on errors. Previously,
  DC> however, @Larry have tossed back and forth the possibility of using $0
  DC> as the first capture variable so that the indices of $/[0], $/[1],
  DC> $/[2] match up with the "names" of $0, $1, $2, etc.

  DC> I think this error--unintentional, I swear!--argues strongly that
  DC> internal consistency within Perl 6 is more important than historical
  DC> consistency with Perl 5's $1, $2, $3...

i would like them to be consistant too. you could also make $/[1] be the
same as $1 and not use $/[0] for a regular grab. then $0 and $/[0] could
be used for something special. but just 0 basing them both is fine with
me. the key is to align them. we all seem to agree this is a massive off
by 1 error waiting to happen.

we still haven't seen what @larry has to say about mixing $1[$j] and
$1.1 syntaxes (let's assume they both use the same index base).

uri

-- 
Uri Guttman  ------  [EMAIL PROTECTED]  -------- http://www.stemsystems.com
--Perl Consulting, Stem Development, Systems Architecture, Design and Coding-
Search or Offer Perl Jobs  ----------------------------  http://jobs.perl.org

Reply via email to