What do you want?
I propose += op should be automatically overloaded by compiler when + has been overloaded. The behavior of A += B should be automatically defined as A = A + B.
And the same should be applied to other arithmetic ops (-=, *=, /=, %=).
Why do you want this?
A + B always return A's type (also B's type).Useful. Overloading on += etc is commonly used in areas such as scientific computing.
Saving time. This is obvious - use += directly.
Safe and natural. A += B should do A = A + B. Imagine a piece of code defining behavior of += not like this, I believe other programmers will complain about it.
Yes I think this will be supported.
Most helpful comment
Yes I think this will be supported.