What is the best alternative to K&R (UNIX Kernel) Style?
Here’s the Deal
Slant is powered by a community that helps you make informed decisions. Tell us what you’re passionate about to get your personalized feed and help others.
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. See More
The fact that the code lines up up with the braces makes this by far and away the easiest style to read. The code flows much more naturally, there is zero doubt about which block the codes belongs to, your eyes are quickly drawn to what belongs where. See More
When scanning vertically through large sections of code to review the code execution flow, having the braces indented means less noise to filter out. The execution flow statements stand alone on the vertical line and are thus far more quickly picked out by the eye. See More