1 min readNov 12, 2019
Yes. Preincrement and postincrement have different semantics, and one should never use postincrement where preincrement can be used.
“The compiler will optimize it away” is an incredibly lazy justification for using i++ instead of ++i. Moreover, it is basically only true for built-in types, not for class types.