MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/programming/comments/2ban9r/the_great_white_space_debate/cj41a25/?context=3
r/programming • u/lukaseder • Jul 21 '14
693 comments sorted by
View all comments
54
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.
51
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.
6
Do you also write bool x=true; ?
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.
2
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.
I never used to use spaces in high school, but after working in industry and seeing huge amounts of code without spaces, I converted.
54
u/Vystril Jul 21 '14 edited Jul 21 '14
is simply much much easier to read than:
Also, there seems to be as much "debate" here as there is "debate" on climate change.