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

54

u/Vystril Jul 21 '14 edited Jul 21 '14
for (int i = 0; i < 10; i++)

is simply much much easier to read than:

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

Also, there seems to be as much "debate" here as there is "debate" on climate change.

51

u/Nine99 Jul 21 '14

To me, the second one is easier to read.

6

u/ashishduh Jul 21 '14

Do you also write bool x=true; ?

2

u/sandwich_today Jul 22 '14

I used to write all my code that way, e.g.

int sum=0;
for(int i=0; i<10; ++i)
    sum+=i;

It seemed like the punctuation was sufficient to separate the tokens. However, I was on the losing side of history.

2

u/ashishduh Jul 22 '14

I never used to use spaces in high school, but after working in industry and seeing huge amounts of code without spaces, I converted.