In code I write I make a conscious effort to arrange orders in arrays to be able to use a += ({17}) instead of a = ({17}) + a. In other code I also see constructs of the first kind far more often than the second. Do you really have the opposite perception of the situation?
All you have to do is put the "main data collection" to the right, and the "change" to the left, and you will get this.
No. Then I had to reverse the main collection both before and after the operation, or else start replacing the use of a += ({17}) with the both clumsier and slower a = ({17}) + a everywhere else.
/ Martin Stjernholm, Roxen IS
Previous text:
2002-12-03 23:25: Subject: `| and order on arrays
I can. All the op= operators are centered on the left operand. That (if nothing else) makes "left stable" operations much more common than "right stable" ones.
Uh, I though that "right stable" operations were more common in Pike. Can you present some statistics which supports your claim?
When it comes to `|, I believe it's more useful if the order of the main data collection takes precedence over that of the change since it's typically the existence of the elements and not the order that one wants from the change.
All you have to do is put the "main data collection" to the right, and the "change" to the left, and you will get this.
/ Marcus Comstedt (ACROSS) (Hail Ilpalazzo!)