Re: Slice refs

2001-05-21 Thread Nicholas Clark
On Mon, May 21, 2001 at 08:04:58AM -0500, Jarkko Hietaniemi wrote: > All this talk about slices reminds me of this: > > http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2000-10/msg00024.html > > Although in this thread the idea was more in the way of an internal > implementation (e.g. to

Re: Slice refs

2001-05-21 Thread Damian Conway
Peter wrote: > >$ref = > > sub{my%k;@k{@{+pop}}=\(@_);splice@_,$_,!$k{$_}for reverse > > 0..@_;\@_}->(@A,\@I); > > Oh, well, if I'd known it was *that* succinct... > > But... that *does* involve copying; the original poster was talking > about huge arrays where copyin

Re: Slice refs

2001-05-20 Thread Peter Scott
At 01:31 PM 5/21/2001 +1000, Damian Conway wrote: >> Um, this is a tiny little diversion here prompted by something that >> came up on perl-beginners, of all places... it's not possible in >> perl 5 to make a reference to an array or hash slice without doing >> some copying. >>

Re: Slice refs

2001-05-20 Thread Damian Conway
Peter Scott wrote: > > Um, this is a tiny little diversion here prompted by something that > came up on perl-beginners, of all places... it's not possible in > perl 5 to make a reference to an array or hash slice without doing > some copying. > Hey, this is *Perl*! Of course i

Slice refs

2001-05-20 Thread Peter Scott
Um, this is a tiny little diversion here prompted by something that came up on perl-beginners, of all places... it's not possible in perl 5 to make a reference to an array or hash slice without doing some copying. It would be nice if perl 6 made that possible. Maybe it already does and I have