Antimemes rulemoosetwin@lemmy.dbzer0.com to 196@lemmy.blahaj.zone – 224 points – 9 months ago35Post a CommentPreviewYou are viewing a single commentView all commentsAnything but K&R is psychopathic, fight meAllman if the condition is very long while(isSomething && isSomethingElse && nFoo < 10) { bla(); bla(); } vs while(isSomething && isSomethingElse && nFoo < 10) { bla(); bla(); } Hmm, 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 widthThis is the way.1 more...Allman is allright, anything else I agree.No no, you're speaking the truthIsn'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.1 more...
Anything but K&R is psychopathic, fight meAllman if the condition is very long while(isSomething && isSomethingElse && nFoo < 10) { bla(); bla(); } vs while(isSomething && isSomethingElse && nFoo < 10) { bla(); bla(); } Hmm, 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 widthThis is the way.1 more...Allman is allright, anything else I agree.No no, you're speaking the truthIsn'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.1 more...
Allman if the condition is very long while(isSomething && isSomethingElse && nFoo < 10) { bla(); bla(); } vs while(isSomething && isSomethingElse && nFoo < 10) { bla(); bla(); } Hmm, 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 widthThis is the way.1 more...
Hmm, 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 widthThis is the way.
Isn'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.
Anything but K&R is psychopathic, fight me
Allman if the condition is very long
vs
Hmm, I think the condition gets newlined and you K&R on the closing parenthesis IMO:
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 widthThis is the way.
Allman is allright, anything else I agree.
No no, you're speaking the truth
Isn'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.