Join Nostr
2026-04-09 23:10:55 UTC
in reply to

Brian Swetland on Nostr: As a lifelong 1TBS adherent, I'll fight you on this one. Open braces go on the end of ...

As a lifelong 1TBS adherent, I'll fight you on this one.

Open braces go on the end of the line of the function decl, if/for/switch/while statement, etc. Close braces go on lines by themselves, aligned with the indentation of the line the open brace is on.

Exception 1: An else is preceded by a close brace, indented to match the associated if/else and followed by an open brace on the same line.

Exception 2: case labels are indented the same as the enclosing switch statement.