3 ms·
Putting braces on the same line is the K&R style, which predates Allman style with braces on separate lines. (The original K&R style had the opening brace on a
by int_19h 5y ago
Putting braces on the same line is the K&R style, which predates Allman style with braces on separate lines.
(The original K&R style had the opening brace on a separate line for functions, but I believe this is due to the original syntax for declaring argument types - if you declare them on separate lines, like variables, a distinct { clearly ends the argument block and starts the function body.)