When comparing GNU 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 GNU style is ranked 4th. 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 Comments are written in English
The GNU coding standard requires that programmers write their comments in English because English is the most widely known language by programmers all over the world. This makes programs written in GNU style easy to understand internationally.
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 Harder to understand which statement the ending brace belongs to
Since braces are in a newline and indented by two spaces, it may be hard to understand what statement the ending brace belongs to.
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.