Re: Circular dereference?

2005-05-10 Thread Thomas Sandlaß
Juerd wrote: No, again, please do not make the mistake of thinking VALUES have identity. VARIABLES (containers) do. A reference points to a container, never to a value directly. I don't consider it a mistake. So, you dany identity to fat values like database connections or GUI objects? This is

Re: Circular dereference?

2005-05-10 Thread Juerd
Thomas Sandlaß skribis 2005-05-10 19:02 (+0200): Juerd wrote: No, again, please do not make the mistake of thinking VALUES have identity. VARIABLES (containers) do. A reference points to a container, never to a value directly. I don't consider it a mistake. That is a problem. So, you

Re: Circular dereference?

2005-05-06 Thread David Storrs
On May 4, 2005, at 2:38 PM, Thomas Sandlaß wrote: Aaron Sherman wrote: If we agree that the first say should print 7, then we must conclude that either we've changed the value of undef to 7, or we've created a circular reference. In my view of refs 7 is printed, indeed. But I've difficulty to

Re: Circular dereference?

2005-05-04 Thread Juerd
Autrijus Tang skribis 2005-05-04 21:13 (+0800): What should this do, if not infinite loop? my ($x, $y); $x = \$y; $y = \$x; $x[0] = 1; I'm still against any explict scalar dereferencing, so: fail, complaining about $x not being an arrayreference (not knowing how to handle postcircumfix:[

Re: Circular dereference?

2005-05-04 Thread Juerd
Juerd skribis 2005-05-04 15:18 (+0200): I'm still against any explict scalar dereferencing, so: fail, complaining about $x not being an arrayreference (not knowing how to handle postcircumfix:[ ]). Ehm :) s/explicit/implicit/ Juerd -- http://convolution.nl/maak_juerd_blij.html

Re: Circular dereference?

2005-05-04 Thread Larry Wall
On Wed, May 04, 2005 at 03:18:29PM +0200, Juerd wrote: : Autrijus Tang skribis 2005-05-04 21:13 (+0800): : What should this do, if not infinite loop? : my ($x, $y); $x = \$y; $y = \$x; $x[0] = 1; : : I'm still against any explict scalar dereferencing, so: fail, : complaining about $x not

Re: Circular dereference?

2005-05-04 Thread Larry Wall
On Wed, May 04, 2005 at 09:38:58PM +0800, Autrijus Tang wrote: : On Wed, May 04, 2005 at 06:24:34AM -0700, Larry Wall wrote: : Yes, it doesn't immediately deref as an array, so it fails. : : Oh. So autodereference is only one level? I got it all wrong : in Pugs, then. I wonder where I got

Re: Circular dereference?

2005-05-04 Thread Thomas Sandlaß
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. Now let's look at $x = 1. I think it goes down to

Re: Circular dereference?

2005-05-04 Thread Autrijus Tang
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

Re: Circular dereference?

2005-05-04 Thread Thomas Sandlaß
Autrijus Tang wrote: If the reference semantics changed drastically, please reflect it prominiently in the relevant Synopsis. :) Unfortunately I don't feel entitled to do so. I'm just an interessted bystander, not a member of the design team. Sorry. -- TSa (Thomas Sandlaß)

Re: Circular dereference?

2005-05-04 Thread Juerd
Thomas Sandlaß skribis 2005-05-04 17:30 (+0200): 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. No, again, please do not make the mistake of thinking VALUES

Re: Circular dereference?

2005-05-04 Thread Aaron Sherman
On Wed, 2005-05-04 at 11:30, 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

Re: Circular dereference?

2005-05-04 Thread Thomas Sandlaß
Aaron Sherman wrote: Squint harder ;-) I'm trying! If we agree that the first say should print 7, then we must conclude that either we've changed the value of undef to 7, or we've created a circular reference. In my view of refs 7 is printed, indeed. But I've difficulty to understand what you