|
|
|
|
|
by kbolino
783 days ago
|
|
K&R doesn't just mean the opening brace isn't on its own line, it also means single-line blocks have no braces at all. Always using braces but not putting the opening one on its own line is 1TBS (not the best name, but I don't know what else it's called). |
|
All these are configurable (and not enforced by default but you can definitely do so with .editorconfig).
It is also fairly popular in C# to use expression-bodied members where they have just a single expression/statement e.g.