[...] I furthermore expected the elements in the first array to remain unchanged with precedence over those in the second, since that makes it behave more consistently when used as |=, in which case all the elements in the left operand would remain on the same indices.
Consistant with what? Giving the right operand precedence is consistant with the other |(=) operators AFAIK:
Pike v7.3 release 62 running Hilfe v3.5 (Incremental Pike Frontend)
(["hej":17])|(["hej":42]);
(1) Result: ([ /* 1 element */ "hej":42 ])
/ Marcus Comstedt (ACROSS) (Hail Ilpalazzo!)
Previous text:
2002-12-03 19:06: Subject: `| and order on arrays
I thought `| should keep the order when used on arrays:
Pike v7.3 release 62 running Hilfe v3.5 (Incremental Pike Frontend)
({1,2,3}) | ({2,4,1,17});
(1) Result: ({ /* 5 elements */ 3, 2, 4, 1, 17 })
Looks like it keeps the order in the second array, but the remaining elements in the first are swapped in this case. I furthermore expected the elements in the first array to remain unchanged with precedence over those in the second, since that makes it behave more consistently when used as |=, in which case all the elements in the left operand would remain on the same indices.
Wasn't this discussed and supposedly fixed some time ago (half a year or so)?
/ Martin Stjernholm, Roxen IS