On Wed, May 04, 2005 at 05:30:48PM +0200, Thomas Sandla� wrote:
> Autrijus Tang wrote:
> >What should this do, if not infinite loop?
> >
> > my ($x, $y); $x = \$y; $y = \$x; $x[0] = 1;
>
> Hmm, after the my both $x and $y store an undef.
> Then $x stores a ref to undef. Then $y stores
> a ref to ref of undef. I see no circle.
Note that your explanation is completely different
from the Perl 5 semantics, which my impression was
that the same model is followed by Perl 6. To wit:
# Perl 5 code
my ($x, $y); $x = \$y; $y = \$x; print $$$$$$$$$$$x;
If the reference semantics changed drastically, please
reflect it prominiently in the relevant Synopsis. :)
Thanks,
/Autrijus/
Thread Previous
|
Thread Next