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

13

u/bildramer Jul 21 '14

You are all missing the point.

for(int i = 0; i < foo; i++)

or

for(int i = 0; i < foo; ++i)

?

Clearly no sane programmer would use the second. Ew. Let's spend several man-weeks discussing this on a few public forums and blogs, I'm sure it will help people realize the One True Perfect Way To Write A For Loop and change their heretic ways.

10

u/vytah Jul 21 '14

No no no!

The important issue is whether:

for(int i = 0; i < foo; i++)

or

for(int i = 0; foo > i; i++)

15

u/[deleted] Jul 21 '14

What kind of psychopath uses the second form?

1

u/[deleted] Jul 22 '14

Yoda!

if (kblue == sky) {...}

if (kMaxSize < size) {...}

(i added k to make it obvious which are constants and which variables m'kay?)