You're viewing a single thread.
View all comments
35
comments
Anything but K&R is psychopathic, fight me
67 0 ReplyAllman if the condition is very long
while(isSomething && isSomethingElse && nFoo < 10) { bla(); bla(); }
vs
while(isSomething && isSomethingElse && nFoo < 10) { bla(); bla(); }
28 0 ReplyHmm, I think the condition gets newlined and you K&R on the closing parenthesis IMO:
while ( isSomething && isSomethingElse && nFoo < 10 ) { blah(); blah(); }
You could also keep
isSomething
on the first line too, but I think it's nice to keep the whole multiline condition at the same indent width53 0 ReplyThis is the way.
11 0 Reply
while(isSomething && isSomethingElse && nFoo < 10 ) { bla(); bla(); }
1 0 Reply
Allman is allright, anything else I agree.
10 0 ReplyNo no, you're speaking the truth
6 0 ReplyIsn't Java like this? Everybody I know who codes java does it like this and I've been trying to follow along despite it looking stupid.
3 0 Reply
You've viewed 35 comments.
Scroll to top