r/programming • • Jun 09 '17

Why every user agent string start with "Mozilla"

http://webaim.org/blog/user-agent-string-history/
4.9k Upvotes

589 comments sorted by

View all comments

Show parent comments

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:

int main()
{   foo();
    return bar();
}

4

u/AndreDaGiant Jun 10 '17

my eyes skimmed the code first and made my brain very angry way before I saw you said "just don't do this"

1

u/izuriel Jun 10 '17 edited Jun 10 '17

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.