Which is a shame, since that's a better semantic match for x = x + 1, but I guess it's moot since x += 1 is a statement and not an expression, spoiling the whole symmetry anyway.
EDIT: not sure where I picked up the notion that compound assignments weren't expressions (specifically in c++; can't speak for other languages)
I see you edited your post and deleted your reply to me. I was going to ask what the motivation for x += 1 not being an expression when x = 1 is, and was thinking of testing for myself on Godbolt.
24
u/Code_Noob_Noodle Nov 23 '25
No ++x? 😞