> On Tue, Aug 29, 2000 at 07:27:15PM -0700, Peter Scott wrote:
> > >         $r->{{qw(a b c d e f g h)}}
> > >         $r->{a}->{b}->{c}->{d}->{e}->{f}->{g}->{h}
> >
> >         $r->{a}{b}{c}{d}{e}{f}{g}{h}
> > 
> > which is only one character longer than the proposal...
> 
> Except in the case where you don't have the list until run-time.

   <snip>

> So the syntax would be useful; I'm not sure how useful, such deeply nested
> hashes requiring run-time key lookup like that are a rarity.  The array
> syntax would also be useful in multi-dimensional arrays.

That is if multi-dimensional arrays are implemented as lists-of-lists, 
which they might not be.

On language-data a counter-proposal to my RFC169 has been made, 
suggesting the use of array/list references for multidimensional 
indices.  In the simplest case, assuming list-of-list implementation, 
$a[[1,2,3]] would be the same under both proposals (unless this 
proposal would require $a[[(1,2,3)]], which is too much syntax for my 
taste).  But the list-ref idea would also allow @a[$point1,$point2] as 
a slice of two elements of the matrix @a, each point being a reference 
to a 4-element list of integers.

> 
> 
> Michael
> --
> Administrator                      www.shoebox.net
> Programmer, System Administrator   www.gallanttech.com
> --

-- 
     Buddha Buck                             [EMAIL PROTECTED]
"Just as the strength of the Internet is chaos, so the strength of our
liberty depends upon the chaos and cacophony of the unfettered speech
the First Amendment protects."  -- A.L.A. v. U.S. Dept. of Justice


Reply via email to