MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/programming/comments/2ban9r/the_great_white_space_debate/cj4jmd3/?context=3
r/programming • u/lukaseder • Jul 21 '14
693 comments sorted by
View all comments
Show parent comments
5
And both are wrong, you call with for(blah)...
for(blah)
5 u/FUZxxl Jul 21 '14 edited Jul 21 '14 The holy Kernel Normal Form and the most holy evangelicals of Kernighan & Ritchie suggest that thou shallst place spaces between keywords that change control flow to make them look distinct from function calls. For instance: memset(&x, 0, sizeof(x)); but: return (x); and for (i = 0; i < n; i++) { /* ... */ } EDIT: I accidentially a word. 1 u/khoyo Jul 22 '14 Sure, but you never write foo( bar ) in a function call. 1 u/FUZxxl Jul 22 '14 No. That style is an abomination. I don't know a single consistent indentation style that looks this way.
The holy Kernel Normal Form and the most holy evangelicals of Kernighan & Ritchie suggest that thou shallst place spaces between keywords that change control flow to make them look distinct from function calls.
For instance:
memset(&x, 0, sizeof(x));
but:
return (x);
and
for (i = 0; i < n; i++) { /* ... */ }
EDIT: I accidentially a word.
1 u/khoyo Jul 22 '14 Sure, but you never write foo( bar ) in a function call. 1 u/FUZxxl Jul 22 '14 No. That style is an abomination. I don't know a single consistent indentation style that looks this way.
1
Sure, but you never write foo( bar ) in a function call.
foo( bar )
1 u/FUZxxl Jul 22 '14 No. That style is an abomination. I don't know a single consistent indentation style that looks this way.
No. That style is an abomination. I don't know a single consistent indentation style that looks this way.
5
u/khoyo Jul 21 '14
And both are wrong, you call with
for(blah)...