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

2000-09-27 Thread Nathan Wiger
Bart Lateur wrote: > > >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. > > You are suggesting to keep a weird prece

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

2000-09-26 Thread Bart Lateur
On Mon, 25 Sep 2000 19:26:38 -0700, Nathan Wiger wrote: >> 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 >

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

2000-09-25 Thread Nathan Wiger
> 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 t

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

2000-09-25 Thread Jeremy Howard
Buddha Buck wrote: > The main problem I see are these: > > @array = ([1,2],[3,4]); # 2-dimensional array, using LOL syntax > print $array[[1,1]]; # prints 4, OK > print $array[1]; # prints ? > print $array[[1,1,1]]; # prints ? > print $array[[1]]; # prints ? > > Ac

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

2000-09-25 Thread Buddha Buck
> On Fri, 22 Sep 2000 08:58:10 +1100, Jeremy Howard wrote: > > >Bart Lateur wrote: > >> Hmm... the problem is, I think, that array references and ordinary > >> scalars are both scalars. > >> > >That's true, but they're scalars with different interfaces. In particular, > >an array ref can be deref

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

2000-09-25 Thread Bart Lateur
On Fri, 22 Sep 2000 08:58:10 +1100, Jeremy Howard wrote: >Bart Lateur wrote: >> Hmm... the problem is, I think, that array references and ordinary >> scalars are both scalars. >> >That's true, but they're scalars with different interfaces. In particular, >an array ref can be dereferenced and prov

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

2000-09-21 Thread Jeremy Howard
Bart Lateur wrote: > Hmm... the problem is, I think, that array references and ordinary > scalars are both scalars. > That's true, but they're scalars with different interfaces. In particular, an array ref can be dereferenced and provides an array in doing so. If an index can do this, then it's a

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

2000-09-21 Thread Bart Lateur
On 20 Sep 2000 04:06:02 -, Perl6 RFC Librarian wrote: >Ilya Zakharevich brought up the issue of a potential problem with >objects which use blessed list references as their internal structure, >and their use as indices. Given a Bignum class, which stores its >(external) value internally as a

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

2000-09-19 Thread Perl6 RFC Librarian
This and other RFCs are available on the web at http://dev.perl.org/rfc/ =head1 TITLE Arrays: Use list reference for multidimensional array access =head1 VERSION Maintainer: Buddha Buck <[EMAIL PROTECTED]> Date: 8 Sep 2000 Last Modified: 19 Sep 2000 Mailing List: [EMAIL PROTECTED