HaloO chromatic,

you wrote:
On Mon, 2005-09-19 at 13:01 +0200, TSa wrote:

Why shouldn't there be a lvalue traversal that
in the end makes

  ($x, $y) = \($a, $b);

actually mean

  $x = \$a; $y = \$b;

Does this not go from one sequence point (evaluate the rhs sufficiently,
then perform the lvalue assignments) to multiple sequence points?  I'm
not sure you can always reason effectively about the lack of side
effects here.

I think you are right. I just used the two forms to illustrate my idea.
But since the default list is lazy while item evaluation is eager my
first case should probably be written as

  **($x, $y) = \**($a,$b);

and even then might not give the interleaved execution sequence:

  1: $x  as lvalue
  2: \$a as rvalue
  3: $y  as lvalue
  4: \$b as rvalue

but 1,3,2,4. OTOH, it is the programmer's choice. The only thing that
he should be aware of is how much undeterminsm is in which alternative.

And I wonder if

  [=] **zip( $x, $y ; \($a,$b) );

results in the 1,2,3,4 sequence deterministically.
$TSa.greeting := "HaloO"; # mind the echo!

Reply via email to