Hi, Yuval Kogman wrote: > On Sat, Aug 27, 2005 at 14:29:29 +0200, Ingo Blechschmidt wrote: >> * @foo[$idx] := $var; >> my @bar = @foo; >> $var = $new_var; >> # @foo[$idx] and $var are now $new_var, but @bar is unchanged, >> # right? > > Yes, I agree. But we do need a way in the middle. Right now we have: > > @bar := @foo; # array container aliased, so all nested > containers are shared > > @bar = @foo; # array structure duplicated, elem containers > duplicated > > but no way to say all the elements are the same, but the structure > isn't. Maybe this works, but I don't think so since assignment isn't > an operator, but a syntactic construct (i think): > > @bar >>:=<< @foo;
I like this very much! :) Additionally, if we allow hyperizing = and :=, we could get rid of the special lists-as-lvalues magic: # If you had previously written ($foo, $bar) = ($grtz, $baka); # you'd now write ($foo, $bar) »=« ($grtz, $baka); (But, FWIW, I kind of like the special lists-as-lvalues magic.) --Ingo -- Linux, the choice of a GNU | In Nature there are neither rewards nor generation on a dual AMD | punishments, there are consequences. Athlon! | -- R.G. Ingersoll