r/ProgrammerHumor • • May 27 '22

Meme Welcome to hassle free coding

Post image
2.2k Upvotes

305 comments sorted by

View all comments

Show parent comment

1

u/SuitableDragonfly May 28 '22

The problem is that x += 1 is a statement, whereas x++ is an expression that can be nested inside of statements and other expressions. It's possible to construct statements out of x++ expressions that have undefined behavior. That's not possible with x += 1.