{ Obsessing About Curly Braces? }

Posted: January 21, 2011 in Architecture, C#, Quality
Tags: , ,



If you feel strongly that curly braces are best lined up in a particular style, then I have to wonder if you view code more at a low level than at a high level.

At a higher level, code could be thought of as assemblies made up of classes with statics, fields, methods, properties, and events. Curly braces are not very relevant at that level.

Quality code design happens at higher levels, not at curly braces level. Coding and design are usually inseparable at all but the most disciplined companies. Maintaining that higher-level focus while coding will yield better design.

Inconsistent curly braces or other syntactic styling, however, will distract other developers from the higher-level aspects of code, causing them to see the syntax before they see the higher-level constructs such as method, property, and class design.

Most good, experienced developers can get used to any team’s style rules in a week or two, no matter how illogical the rules may be.

Be consistent, and let those curly braces drift into the background.



Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s