On Tue, Jul 31, 2001 at 03:09:36PM +0200, Bart Lateur wrote:
> On Tue, 31 Jul 2001 08:04:23 -0400, Clinton A . Pierce wrote:
> 
> >But the problem solved is similar to that of keys/values and each; and
> >the "smart" range operators in later perls: avoiding having heaping piles of
> >crap returned by an operator/function that can better be done in place.  If
> >we can do this without adding a keyword I don't see why not.
> >
> >This feels like the Right Thing to do.  It really does.
> 
> Oh.
> 
> Wouldn't swapping two references be faster than swapping two scalars?

No.

This ain't C.

A reference *is* a scalar. And a scalar is blob of memory. With a
pointer to it.  Swapping two Perl references means swapping two C
pointers. Swapping two Perl scalars means swapping two C pointers.



Abigail

Reply via email to