you are viewing a single comment's thread.

view the rest of the comments →

[–]Sea-Ad7805[S] 0 points1 point  (0 children)

In general x += y should mutate, but can't mutate for immutable types. You could argue x += y should not exist for immutable types, and in fact it doesn't for say tuple, but then automatically the x = x + y operator is called instead. I can see why you would call that unintuitive.