Re:Poll: Allman or K&R Indentation?
by ChuckMcM on Wednesday July 27, 2011 @08:14PM
(#2814838)
I find the 1TBS style maximizes the number of lines I can get on the screen which helps in understanding what the code is doing.
I don't miss the opening brace because when I see the closing brace I can go straight up to the controlling statement.
A variant that Sun used to use was that for functions you defined them thusly:
int
function_name(args) {
...
}
The benefit was that grep '^function_name' *.c would turn up the file with the definition (vs the prototypes which were of the form int function_name(...))
I don't miss the opening brace because when I see the closing brace I can go straight up to the controlling statement.
A variant that Sun used to use was that for functions you defined them thusly:
int function_name(args) { ... }
The benefit was that grep '^function_name' *.c would turn up the file with the definition (vs the prototypes which were of the form int function_name(...))