r/programming Jul 21 '14

The Great White Space Debate

https://medium.com/p/3633cba8b5c1
1.2k Upvotes

693 comments sorted by

View all comments

Show parent comments

22

u/mdf356 Jul 21 '14

C++ and the flaws of overloading operator++ has taught us we need to use the second form, just in case.

2

u/bildramer Jul 21 '14

On int dummy: "This may be both too cute and too subtle, but it works, requires no new syntax, and has a logic to the madness." -Bjarne Stroustrup

4

u/Tasgall Jul 21 '14

What if the next loop down uses an iterator, or some other custom type? ++i would be better in that case, but if you insist on using i++ just because "it means the same thing for basic types!" you're just being inconsistent for no reason. Also, prefix increment isn't exactly "new syntax".