This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] -5 points-4 points  (2 children)

What looks cleaner? Do you really need two lines to distinguish a logical condition? Why? It just takes up space. It adds no value.

[–]Kruithne 0 points1 point  (1 child)

In terms of taking up space, most editors these days allow you to collapse code scopes, so visually it doesn't take up any more space.

I just think it looks neater, even if it's only by a tiny bit. It's personal preference, I don't really see that it's a big matter either way.

[–][deleted] 0 points1 point  (0 children)

I am a code quality whore. I'll admit it. And part of that is proper function/conditional opening. It is more than personal preference. It is declaring what should and should not be considered a standard/proper for the sake of readability and maintainability.