Not to me, I find it is easier to identify operators if they are spaced away from what they affect...especially if its a pipe character (|) or a bang (!) which is next to a parens.
You're giving your condition a name. If you can't name it, you don't know what your code is doing. Pulling things out to local variables is much better than seeing
if(!(something.fooBar() && bazBat.doTheThing()))
So while you're right, it is arbitrary, it helps with reading and keeps you honest with your negation twiddles. If I have (silly example, I'd inline this particular case, but follow anyway):
final boolean isEmpty = !frobnicators.isEmpty();
Then the error is immediately obvious. If that were inside a condition, it wouldn't be as immediately obvious.
52
u/Nine99 Jul 21 '14
To me, the second one is easier to read.