Well, the fact that `a = ({ 17 }) + a' is more clumsy to write than `a = a + ({ 17 })' is of course a syntactic misfeature. It would be quite nice (and much more symmetric) to have a syntax for compacting the first variant into an op-assignment as well. Any suggestions? IIRC, the `a =+ foo' syntax was abandoned by the C people because it led to ambiguities if the whitespaces was ommitted, so although a natural choice it would probably be an unsuitable candidate for a new syntax.
/ Marcus Comstedt (ACROSS) (Hail Ilpalazzo!)
Previous text:
2002-12-03 23:30: Subject: `| and order on arrays
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