Exactly.  We need a nondestructive slice.  Some short piece of
syntax which expands 

        for [my](list of vars) (big list){ ... }

to

        my @uniquelynamedcopy = (big list);
        while ( [my](list of vars) = splice(@u15y,0,(length of list of vars))){ ... }



I think the absence of a comma btn the two lists would
be enough to tip C<for> off that it is this kind of situation,
since currently 

        for ($a) (split //) {

is a syntax error




Eric Roode wrote:
> 
> Peter Scott wrote:
> >Graham Barr once allowed as how he thought it would be neat if you could say
> >
> >       for my($x, $y, $z) (@list) { ... }
> 
> ObLanguageMinimalist:
> 
> Um. Is this so frequently-used that the above syntax is preferable to:
> 
>     while ( ($x, $y, $z) = splice (@list, 0, 3) )   {...}
> 
> ? (notwithstanding the destructive nature of splice)
> 
>  ----------------------------------------------------------------------
>  Eric J. Roode,  [EMAIL PROTECTED]           print  scalar  reverse  sort
>  Senior Software Engineer                'tona ', 'reh', 'ekca', 'lre',
>  Myxa Corporation                        '.r', 'h ', 'uj', 'p ', 'ts';

-- 
                          David Nicol 816.235.1187 [EMAIL PROTECTED]
                                               Yum, sidewalk eggs!

Reply via email to