5 ms·
> Trivial example: a = a+b is slightly easier to say (and think) in English than a += b Native English speaker here. "+=" is pronounced "plus equals", meaning
by mmirate 8y ago
> Trivial example: a = a+b is slightly easier to say (and think) in English than a += b
Native English speaker here.
"+=" is pronounced "plus equals", meaning that you've got it backwards, with the margin being by the number of mental syllables taken by a - though if a really is "a", then that's only 1.
However, the above considerations only cover recitation.
Comprehension, especially in real-world scenarios, is another matter entirely. "a" might be some other, longer name (and probably amongst a set of long names with a common prefix/accessor). When I read "a = a + b", it takes me some amount of effort to verify whether the lvalue is in fact the same word as the lhs of the operator. When I read "a += b", that effort is not needed. The difference again is proportional to the length of a.