> Jeremy Howard wrote:
> 
> > Sorry--I need to correct this. The correct syntax for a list slice under my
> > proposal would actually be:
> > 
> >   @a[10:20:2][11:30:3]
> > 
> > It needs the '@' of course since it's returning an array, and it needs to
> > use the standard LOL notation with the extension to multiple elements. OTOH:
> > 
> >   @a[[10:20:2], [11:30:3]]
> > 
> > would actually just return the 2 points at (10,12,14,16,18,20) and
> > (11,14,17,20,23,36,29).
> 
> I think a combination of yours and Budda's proposal is actually very
> nice:
> 
>   @a[10:20:2; 11:30:3]; # ; implies cartesian product of indices
>   @a[10..20:2; 11..30:3];  # same with .. syntax
>   @a[[10,20,2],[@index], [0,0,0]] # comma-separated index refs means
>                                   # individual elements
> 
> Is that a possible compromise?

I'm willing to put this proposed compromise in RFC169v2 -- I like it, 
too -- but I'm not willing to put $a[$i][$j][$k] as equivilant to 
$a[[$i,$j,$k]] or $a[$i;$j;$k] into any RFC with me as the maintainer.  
I welcome Jeremy writing an RFC that does that, though.

> 
>   Christian

-- 
     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