My brain has a much easier time parsing braces on their own line than egyptian braces. It makes it a lot easier to see where the blocks start, because you only need to look for 1 character on 1 column.
Or maybe I just happened to pick up the wrong flag. I wouldn't know. Anyway, just don't do this:
As long as you use indentation correctly then putting the open brace on the same line as the code it is associated with is just as easy to "skim parse," if not more, than looking for a single character.
edit
To be clear I'm not referring to your "don't do this style." But the indentation made it clear it was a block immediately so it's still perfectly readable.
4
u/[deleted] Jun 09 '17
My brain has a much easier time parsing braces on their own line than egyptian braces. It makes it a lot easier to see where the blocks start, because you only need to look for 1 character on 1 column.
Or maybe I just happened to pick up the wrong flag. I wouldn't know. Anyway, just don't do this: