Code Formatting

Submitted By: Florin on March 25, 2017

0

0

4242

Code Formatting Source: imgur.com

"Allman has consistent bracket placement. It's easy to see where the starting bracket starts and stops, and it's easier to find missing or extra brackets using this style. Allman makes it obvious at a glance which part is the control statement and which is the actual block of code.

In Allman, if you comment out the control statement, the code will still compile and run. That just doesn't happen with KNF, instead you have to go and hunt down that pesky closing bracket."

- immakinganotehere

http://en.wikipedia.org/wiki/Indent_style

Site Comments (0)

Please Signin or Signup to add a comment