| |
| | Java Technology Forums - Brace style should NOT be K & R |
 | | With allman you look from the open brace to the close brace, k&r you look from the opening line of code to the close brace. |
 | | Unlike the indent size, there are few technical reasons to choose one placement strategy over the other, but the preferred way, as shown to us by the prophets Kernighan and Ritchie, is to put the opening brace last on the line, and put the closing brace first, thusly: |
 | | And finally we come to the worst of the four major styles, the K&R Style, named after Kernighan and Ritchie, because the examples in The C Programming Language use it, and also called Kernel Style, because the Unix kernel is written in it. |
| forum.java.sun.com /thread.jspa?threadID=425793&messageID=1895025 (2608 words) |
|