3 ms·
> but at least there's a fairly straightforward explanation: "`x += y` acts in-place if-and-only-if `x` is mutable". This is the explanation. By definition it
by zahlman 1y ago
> but at least there's a fairly straightforward explanation: "`x += y` acts in-place if-and-only-if `x` is mutable".
This is the explanation. By definition it is only possible when the left-hand side is mutable; and in these cases, it's also typically convenient.
This was apparently seen as "although practicality beats purity" rather than "special cases aren't special enough to break the rules".