Thursday, January 31, 2013

Middle Earth War of the Braces


You know the meme.  As a matter of fact, we've even covered the ground before.  But not in conjunction with a code review.  If you want to know how popular this discussion has become, just go out to Stack Overflow and enjoy one of the posts closed down as not constructive.

The various brace styles actually have names.  You can learn them at Experiment Garden.

  • Allman: brackets on own lines
  • Kernigan and Richie: brackets share lines

Think about that next time you're writing your code.  You could be influencing the style of a whole generation of developers.

Snarky: This code SHALL NOT PASS!
Title: Middle Earth War of the Braces.

No comments:

Post a Comment