develooper Front page | perl.perl6.language.data | Postings from September 2000

Re: RFC 204 (v2) Arrays: Use list reference for multidimensional array access

From:
Nathan Wiger
Date:
September 25, 2000 19:35
Subject:
Re: RFC 204 (v2) Arrays: Use list reference for multidimensional array access
Message ID:
39D0095E.5629FD85@wiger.org
> I agree with both of you. It would be nice if @$ precedence worked as Bart
> specified, but I still think that arrays should be arrays.

The problem is that

   $name = "myarray";
   @$name = (1,2,3);
   print @$name[0,1];  # 1,2

Is very consistent currently. Change one and you have to change the
precedence and parsing of all symbolic refs. I'm not sure this is a good
idea. I'm not necessarily against it, but it's a deep issue not just
constrained to arrays in this one specific context.

-Nate



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About