When comparing (Linux) Kernel Style vs Allman Style, the Slant community recommends Allman Style for most people. In the question“What is the best indentation style in C?” Allman Style is ranked 1st while (Linux) Kernel Style is ranked 5th. The most important reason people chose Allman Style is:
The block of code itself is disconnected from the control statement which allows developers to comment out or remove entirely a control statement without having a large risk of encountering syntax errors because of extra or missing braces.
Ranked in these QuestionsQuestion Ranking
Pros
Pro Easier to define where a block starts and ends
The large indentation suggested by this style makes it easier to define where a block of code starts and where it ends. Especially after looking at a screen for a prolonged amount of time.
Pro The block of code is disconnected from the control statement
The block of code itself is disconnected from the control statement which allows developers to comment out or remove entirely a control statement without having a large risk of encountering syntax errors because of extra or missing braces.
Pro Easy to find matching braces
The code is clearly set apart from the statement by lines that are almost completely whitespace and the fact that the opening braces line up in the same column as the closing braces makes it easier to match them.
Cons
Con Hard to read in small monitors
Since the Kernel style uses 8 characters for indentation, the lines of code are pushed too much to the right. This may make it harder to read for small monitors (for example terminal monitors which are 80 characters wide).
Con Uses more vertical space than other styles
Since each bracket is its own line, the Allman style takes more vertical space than other indent styles. This is one of the reasons that a lot of book authors do not prefer to use Allman style in their texts.