<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>It's all a matter of style</title><link>http://blogs.msdn.com/danielfe/archive/2003/11/24/51893.aspx</link><description>Probably one of the most religious issues for developers (at least those using the same platform and programming language) is bracing style.&amp;#160; There are several styles available, with the two most popular being K&amp;amp;R style &amp;amp; Allman style.&amp;#160;</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>RE: It's all a matter of style</title><link>http://blogs.msdn.com/danielfe/archive/2003/11/24/51893.aspx#51894</link><pubDate>Mon, 24 Nov 2003 11:07:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:51894</guid><dc:creator>Kent</dc:creator><description>Definitely Allman style</description></item><item><title>RE: It's all a matter of style</title><link>http://blogs.msdn.com/danielfe/archive/2003/11/24/51893.aspx#51895</link><pubDate>Mon, 24 Nov 2003 13:55:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:51895</guid><dc:creator>Catatonic</dc:creator><description>I find Allman code easiest to read &amp;amp; to write, but it's no big deal. I care more about tabs. Use an editor that doesn't convert them to spaces, so I can be happy with my 2-space tabs and you can keep your great big ones.</description></item><item><title>RE: It's all a matter of style</title><link>http://blogs.msdn.com/danielfe/archive/2003/11/24/51893.aspx#51896</link><pubDate>Mon, 24 Nov 2003 13:56:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:51896</guid><dc:creator>David Nicholson</dc:creator><description>Well the beauty of  VS is that when I type a } it makes everything 'right', so most stuff tends to get formatted before running.

And of course Allman style is the only way to write ;).</description></item><item><title>RE: It's all a matter of style</title><link>http://blogs.msdn.com/danielfe/archive/2003/11/24/51893.aspx#51897</link><pubDate>Mon, 24 Nov 2003 19:41:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:51897</guid><dc:creator>Luke Hutteman</dc:creator><description>My current preference is Allman style, but I used to be a K&amp;amp;R guy. Even back when I was doing Delphi I used to write &amp;quot;if (...) then begin&amp;quot; all on one line, all in the name of saving space. Screen real-estate has improved a lot through in recent years so now I prefer the readability advantage of Allman over the space-savings of K&amp;amp;R.
While I'm not religious about it, I do feel that it's very imporant when doing team development that everyone agrees on the same style - nothing worse than looking at code that has a mix of two or more different styles used interchangeably.</description></item><item><title>RE: It's all a matter of style</title><link>http://blogs.msdn.com/danielfe/archive/2003/11/24/51893.aspx#51898</link><pubDate>Mon, 24 Nov 2003 20:33:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:51898</guid><dc:creator>Dan Fernandez</dc:creator><description>Big tabs are another pet peeve of mine, if you code inside a namespace, and then you have a class with a method and that method has nested logic, you're talking about four tabs for code, not very pretty...

I definitely agree with Luke that mixing and matching styles is a big no-no...</description></item><item><title>RE: It's all a matter of style</title><link>http://blogs.msdn.com/danielfe/archive/2003/11/24/51893.aspx#51899</link><pubDate>Mon, 24 Nov 2003 22:53:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:51899</guid><dc:creator>Kevin Daly</dc:creator><description>Definitely Allman for me too.
And I admit that if I pick up code formatted in K&amp;amp;R style that I'm intending to keep/extend, I do reformat it, even though in my heart of hearts I know it's silly and anal-retentive to do so.
I'm curious as to how I developed this preference (I honestly don't remember, and my introduction to C was the Kernighan and Ritchie book back in my Amiga days). I always format HTML open/close tags to be balanced and symmetrical in the same way, so either one preference influenced the other or possibly they're both evidence of a deeper pathology. 
Gosh.</description></item><item><title>RE: It's all a matter of style</title><link>http://blogs.msdn.com/danielfe/archive/2003/11/24/51893.aspx#51900</link><pubDate>Tue, 25 Nov 2003 05:43:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:51900</guid><dc:creator>Bob Banks</dc:creator><description>Okay, I'll go against the grain.  K&amp;amp;R for me. Don't really like having a brace on a line by itself.  I also always put in my closing brace immediately after the opening brace. Also changed VS.NET settings so that it doesn't automatically move the brace to a new line.</description></item><item><title>RE: It's all a matter of style</title><link>http://blogs.msdn.com/danielfe/archive/2003/11/24/51893.aspx#51901</link><pubDate>Wed, 26 Nov 2003 01:50:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:51901</guid><dc:creator>Juan Murillo</dc:creator><description>Check out the java coding conventions, this is the true way to indent if you want other to have a good time reading your code:

http://java.sun.com/docs/codeconv/html/CodeConventions.doc3.html#262</description></item><item><title>RE: It's all a matter of style</title><link>http://blogs.msdn.com/danielfe/archive/2003/11/24/51893.aspx#51902</link><pubDate>Wed, 26 Nov 2003 01:53:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:51902</guid><dc:creator>Juan Murillo</dc:creator><description>Here is the one about methods:

http://java.sun.com/docs/codeconv/html/CodeConventions.doc6.html#430</description></item><item><title>RE: It's all a matter of style</title><link>http://blogs.msdn.com/danielfe/archive/2003/11/24/51893.aspx#51903</link><pubDate>Wed, 26 Nov 2003 06:57:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:51903</guid><dc:creator>Keith Patrick</dc:creator><description>I use K&amp;amp;R and am *extremely* anal about using it, too.  And another thing I'm pretty bad about is going through and replacing other people's:
if (x == y)
  x = null;
else
  x = y;

with:
if (x == y) {
  x = null;
}
else {
  x = y;
}</description></item><item><title>RE: It's all a matter of style</title><link>http://blogs.msdn.com/danielfe/archive/2003/11/24/51893.aspx#51904</link><pubDate>Mon, 01 Dec 2003 20:01:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:51904</guid><dc:creator>Gareth Rowlands</dc:creator><description>It's K&amp;amp;R or Java for me too. The brackets just shouldn't have a line of their own.
if (condition) {
    statements;
} else if (condition) {
    statements;
} else {
    statements;
}

In truth, if you were creating a language today and you weren't trying to recruit C programmers to it, you wouldn't have the brackets at all - VB's like that. The main use for the braces is for bragging rights: C/C++/Java have them and VB/COBOL/APL don't.
</description></item><item><title>RE: It's all a matter of style</title><link>http://blogs.msdn.com/danielfe/archive/2003/11/24/51893.aspx#51905</link><pubDate>Sat, 13 Dec 2003 19:06:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:51905</guid><dc:creator>Mike</dc:creator><description>/* 
 *There is a lot of things VB dosn't have.
 */

Read the source of Linux which employs the K&amp;amp;R format. The code is easy to read and it is structured nicely. The largest collaborative project in the world uses it, there is no more to say.</description></item><item><title>re: It's all a matter of style</title><link>http://blogs.msdn.com/danielfe/archive/2003/11/24/51893.aspx#66108</link><pubDate>Mon, 02 Feb 2004 11:06:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:66108</guid><dc:creator>Chris Vincent</dc:creator><description>I'm a K&amp;amp;R guy, but I'm slowly converting to Allman's.  Each new line used to be pain for me, but the readability is worth it.</description></item><item><title>re: It's all a matter of style</title><link>http://blogs.msdn.com/danielfe/archive/2003/11/24/51893.aspx#100423</link><pubDate>Sat, 27 Mar 2004 20:40:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:100423</guid><dc:creator>C Ma</dc:creator><description>I like to use the Horstmann style, which has the advantage of space saving like the K&amp;amp;R style but the readability of the Allman style. After the opening brace, press tab and start typing up the code. If I found a piece of code that I would use in my programs that used a different style, I would probably go ahead and change it, just to be consistent.</description></item><item><title>re: It's all a matter of style</title><link>http://blogs.msdn.com/danielfe/archive/2003/11/24/51893.aspx#143116</link><pubDate>Thu, 27 May 2004 16:10:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:143116</guid><dc:creator>Phillip Rhodes</dc:creator><description>K&amp;amp;R style is a abomination that should be stricken&lt;br&gt;from the face of the planet. :-)&lt;br&gt;&lt;br&gt;Allman style is the only way to go, IMNSHO.</description></item><item><title>re: It's all a matter of style</title><link>http://blogs.msdn.com/danielfe/archive/2003/11/24/51893.aspx#165541</link><pubDate>Fri, 25 Jun 2004 07:40:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:165541</guid><dc:creator>Flinky Wisty Pomm</dc:creator><description>Infidels!&lt;br&gt;&lt;br&gt;Those unfortunates who end up in my employ or training room use K&amp;amp;R or find themselves on the wide end of the LART.&lt;br&gt;&lt;br&gt;I've never understood why Allman style is thought more readable than the One True Brace Style, it's ugly, and it's illogical.  /Statements/ get a line to themselves (with minor caveats), braces do not.&lt;br&gt;&lt;br&gt;That said, I have to agree with the other K&amp;amp;R fan who thinks braces should be dropped entirely. Kudos:  but only if you're going to replace them with strict indentation like Python which is cruftless, reaadable /and/ logical. Huzzah!</description></item><item><title>Bill Gates to blog?</title><link>http://blogs.msdn.com/danielfe/archive/2003/11/24/51893.aspx#165838</link><pubDate>Fri, 25 Jun 2004 18:12:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:165838</guid><dc:creator>Dan Fernandez's Blog</dc:creator><description /></item><item><title>re: It's all a matter of style</title><link>http://blogs.msdn.com/danielfe/archive/2003/11/24/51893.aspx#184879</link><pubDate>Fri, 16 Jul 2004 07:01:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:184879</guid><dc:creator>Greg Woods</dc:creator><description>I program full-time on a 1024x768 laptop screen. Subtract bare minimum VS.NET toolbars etc. You're left with an area that's pefectly usable.... if you use K&amp;amp;R.&lt;br&gt;I can't understand this readability argument. Your eyes scan down the column that the 'if', 'select' 'for' line starts on, and look for the matching closing brace. I never have to look for the opening brace because it's instinctive for me to type: if(){  then go and fil in the condition.&lt;br&gt;ong live K&amp;amp;R. I want to see code on my page not needless white space!</description></item><item><title>re: It's all a matter of style</title><link>http://blogs.msdn.com/danielfe/archive/2003/11/24/51893.aspx#191798</link><pubDate>Fri, 23 Jul 2004 01:11:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:191798</guid><dc:creator>Dave</dc:creator><description>I apparently use 'Whitesmith's'.  I find it interesting that style guides say that Allman and Whitesmith's are equal in prevalence as I have come across no-one else who uses the same style as me and have suffered much chastising about it -- I do see Allman's a great deal, though.&lt;br&gt;&lt;br&gt;Long live Whitesmith's and all the (evidently hidden) masses who use it.&lt;br&gt;&lt;br&gt;BTW, I do have to agree with Keith Patrick's comments about single-statement bodies.  I break my own style by allowing opening and closing braces to be on one line in those cases but I'd much rather have the braces than not.  I've been bitten in the ass a couple times by inferring meaning from misapplied indent ('misapplied' meaning from the standpoint of the original code's own style, not my preferred style; this is of course why Python is preposterous).</description></item><item><title>re: It's all a matter of style</title><link>http://blogs.msdn.com/danielfe/archive/2003/11/24/51893.aspx#200973</link><pubDate>Thu, 29 Jul 2004 18:49:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:200973</guid><dc:creator>Jack Black</dc:creator><description>Allman style for me too. I think statements like &amp;quot;Braces should not get their own line, only statements&amp;quot; are stupid - for one, braces ARE statements, in a way (think Pascal begin and end). For two, your ending braces get a line to themselves in 1TBS, don't they?</description></item><item><title>re: It's all a matter of style</title><link>http://blogs.msdn.com/danielfe/archive/2003/11/24/51893.aspx#203154</link><pubDate>Sat, 31 Jul 2004 21:47:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:203154</guid><dc:creator>Eric</dc:creator><description>Allman for almost everything, with K&amp;amp;R for the few pieces of code where Allman is not appropriate (long series of if/else, independant if followed by just a continue/break or goto (yes those can be useful C or C++ but almost never in more modern languages).&lt;br&gt;&lt;br&gt;And indeed there even even a few occasions where a single line if () { ... } is appriate. That's why you must not be too religious. Strict, yes. Stuborn, no.&lt;br&gt;</description></item><item><title>I'm sorry, but a curlie goes on a new line</title><link>http://blogs.msdn.com/danielfe/archive/2003/11/24/51893.aspx#249378</link><pubDate>Fri, 29 Oct 2004 06:09:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:249378</guid><dc:creator>blog.dreampro</dc:creator><description /></item><item><title>re: It's all a matter of style</title><link>http://blogs.msdn.com/danielfe/archive/2003/11/24/51893.aspx#418617</link><pubDate>Tue, 17 May 2005 15:17:14 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:418617</guid><dc:creator>tom</dc:creator><description>Allman style. It is a lot easier to read if the braces line up vertically; makes it clearer what a block is. &lt;br&gt;&lt;br&gt;i.e. you have an if, while etc. on one line, and the block that it executes on the following line. Block is made up of brace, statements, close brace...&lt;br&gt;&lt;br&gt;I'm also rather anal about ALWAYS putting braces around even single-line blocks in the interests of readability.</description></item><item><title>re: It's all a matter of style</title><link>http://blogs.msdn.com/danielfe/archive/2003/11/24/51893.aspx#443876</link><pubDate>Wed, 27 Jul 2005 19:21:11 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:443876</guid><dc:creator>ChronoFish</dc:creator><description>I hate religious arguments about programming style - yet I'm so opinionated that I can't help to comment and get sucked in to the discussion:&lt;br&gt;&lt;br&gt;I used to be a strict K&amp;amp;R but have really honed in on Allman in the last two years or so.  Allman with inline acceptions (begin-end braces on one line - as long as they do not contain nested braces)&lt;br&gt;&lt;br&gt;I think I like K&amp;amp;R at the time because of the saving in screen realestate.  But now that I'm not limited to an 80x25 CRT display Allman really does make more sense.  When you have multiple nestings of {} it helps a great deal to have them in the same column.  It also flows well logically - Some block label as the header, and then the code-block:&lt;br&gt;&lt;br&gt;block-label&lt;br&gt;{&lt;br&gt;  ...&lt;br&gt;}&lt;br&gt;&lt;br&gt;Indentations are a must - but must not be over done.  Again I find inline acceptable:&lt;br&gt;&lt;br&gt;block-label { .... }&lt;br&gt;&lt;br&gt;But never &lt;br&gt;&lt;br&gt;block-label {...{....}...{....}....}&lt;br&gt;&lt;br&gt;There are several questions that need to be asked:  Who is going to look at my code?  Who is going to debug my code?  Does my coding style help me?&lt;br&gt;&lt;br&gt;If you program for yourself - then it really doesn't matter what you pick.  But if your code is going to be read by someone else, then part of your responsibility is to help them out.&lt;br&gt;&lt;br&gt;Code elegance is small amount of easily readable code.  Not code that takes up little space.&lt;br&gt;&lt;br&gt;-CF</description></item><item><title>re: It's all a matter of style</title><link>http://blogs.msdn.com/danielfe/archive/2003/11/24/51893.aspx#493675</link><pubDate>Thu, 17 Nov 2005 04:18:56 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:493675</guid><dc:creator>Parrot</dc:creator><description>You've got to line up your curly brackets!  No programming teacher I've ever had has ever advocated any other method.  I didn't even know any other methods existed until recently!&lt;br&gt;&lt;br&gt;What the heck kind of a complaint is &amp;quot;Oh, I just don't feel comfortable giving a bracket it's own line&amp;quot;?? It's the start of an entire enclosed section of code, that's not important enough for you?&lt;br&gt;&lt;br&gt;Having brackets that aren't alligned with one another is like having matching bookends holding your books together but one of them is facing sideways and the other is facing forward.  Sure it still works, but it just doesn't look right!</description></item><item><title>re: It's all a matter of style</title><link>http://blogs.msdn.com/danielfe/archive/2003/11/24/51893.aspx#510252</link><pubDate>Sat, 07 Jan 2006 01:25:54 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:510252</guid><dc:creator>DavidE</dc:creator><description>I've had to use all of these styles at one time or another, so I'm pretty flexible. K&amp;amp;R was really useful in the days when most of us programmed on 24x80 terminals. I did find one case where K&amp;amp;R style could prevent a problem. I had a programmer working for me who took the error messages produced by the compiler quite literally. There was a case where the compiler told him that there was a semicolon expected, so he added one:&lt;br&gt;&lt;br&gt;    if (cond) ;&lt;br&gt;    {&lt;br&gt;       code that now always executes&lt;br&gt;    }&lt;br&gt;&lt;br&gt;With K&amp;amp;R style, the code would still work as written. Of course, the real problem was the programmer...</description></item><item><title>re: It's all a matter of style</title><link>http://blogs.msdn.com/danielfe/archive/2003/11/24/51893.aspx#524380</link><pubDate>Sat, 04 Feb 2006 00:11:42 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:524380</guid><dc:creator>A the B</dc:creator><description>Being in an &amp;quot;Allman&amp;quot; shop has really made me hate the style. Taking up extra space for a { makes reading the code more difficult because it makes detecting the indentation of the code more difficult. It also makes catching and handling exceptions hard to read because a rather run-of-the mill exception handling routine can take up many screens. I used to use Allman style but converted to R&amp;amp;K when I realised that I found K&amp;amp;R easyer to read.</description></item><item><title>re: It's all a matter of style</title><link>http://blogs.msdn.com/danielfe/archive/2003/11/24/51893.aspx#575010</link><pubDate>Wed, 12 Apr 2006 19:04:56 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:575010</guid><dc:creator>Daniel DeLuca</dc:creator><description>Allman is best. I have nothing more to add than what others have already posted. I have noticed more programmers have converted from K &amp;amp; R to Allman than vice versa. The arguments for Allman's win hands down. End of discussion.</description></item><item><title>re: It's all a matter of style</title><link>http://blogs.msdn.com/danielfe/archive/2003/11/24/51893.aspx#622492</link><pubDate>Thu, 08 Jun 2006 20:46:15 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:622492</guid><dc:creator>Jeff Spindler</dc:creator><description>I learned C from K&amp;amp;R and even while reading that book, I disliked that style, choosing instead to do what looks like is called Whitesmith's. &amp;nbsp;Now I do Allmans, since that's what VS does automatically - it's hasn't been much of a switch.&lt;br&gt;&lt;br&gt;One thing I do which VS's auto formatter doesn't like is to line up&lt;br&gt; &amp;nbsp; case 'a':&lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// with the following&lt;br&gt; &amp;nbsp; break;&lt;br&gt;&lt;br&gt;so that it's easier to spot missing break statements.</description></item><item><title>re: It's all a matter of style</title><link>http://blogs.msdn.com/danielfe/archive/2003/11/24/51893.aspx#1098257</link><pubDate>Sat, 18 Nov 2006 10:54:22 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1098257</guid><dc:creator>Matthijs</dc:creator><description>&lt;p&gt;Call me stupid... but I am running Visual Studio 2005 express edition, but I can not change the default indentation style to Allman style! Who knows how to do it! Thanks.&lt;/p&gt;
&lt;p&gt;Of course, I found Tools/Options/Text Editor...&lt;/p&gt;</description></item><item><title>re: It's all a matter of style</title><link>http://blogs.msdn.com/danielfe/archive/2003/11/24/51893.aspx#1101122</link><pubDate>Sun, 19 Nov 2006 02:43:17 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1101122</guid><dc:creator>danielfe</dc:creator><description>&lt;p&gt;Hi Matthijs,&lt;/p&gt;
&lt;p&gt;To change this, go to Tools...Options...Text Editor...C#...Formatting...New Lines... and make sure all the checkboxes under the &amp;quot;New Line Options for Braces&amp;quot; are checked. As you check and uncheck each one, you will see a &amp;quot;preview&amp;quot; screen that shows how the option will change formatting.&lt;/p&gt;
</description></item><item><title>re: It's all a matter of style</title><link>http://blogs.msdn.com/danielfe/archive/2003/11/24/51893.aspx#1507663</link><pubDate>Mon, 22 Jan 2007 15:29:51 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1507663</guid><dc:creator>Spedley</dc:creator><description>&lt;p&gt;Thanks danielfe that helped !&lt;/p&gt;
&lt;p&gt;If the New Line Options aren't there you need to check the Show All Setting box in the bottom left.&lt;/p&gt;</description></item><item><title>re: It's all a matter of style</title><link>http://blogs.msdn.com/danielfe/archive/2003/11/24/51893.aspx#1999683</link><pubDate>Sat, 31 Mar 2007 15:41:22 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1999683</guid><dc:creator>A_flj_</dc:creator><description>&lt;p&gt;I came across text naming K &amp;amp; R Kernel style - maybe because it is used in the Linux kernel? Kernel seems easier to write to me, so I'll use this name for it.&lt;/p&gt;
&lt;p&gt;I use Allman since ever. I didn't imagine there could be another style until I encountered it in code written by others or downloaded from the net.&lt;/p&gt;
&lt;p&gt;This may be due to historical reasons. My beginnings as a programmer were in Pascal, almost 20 years ago. So switching from begin/end to {/} naturally led me to Allman.&lt;/p&gt;
&lt;p&gt;Nevertheless, I always considered Pascal a very readable language, perfect for ppl needing to write lots of code occasionally, but not being mainly busy writing code - back then I needed to code my own programs to drive machinery under DOS, my own programs to do statistical processing on data acquired, and the like, but there were long periods of time where I would only use the programs I wrote, and not enhance them.&lt;/p&gt;
&lt;p&gt;So it seems to me reasonable that Allman brings more readability into the code than Kernel.&lt;/p&gt;
&lt;p&gt;I encountered the argument that in C and C++, having the opening brace on the same line makes the difference between a function/method declaration and a function/method definition easier to spot. But I find this to be plain BS, since the difference is actually made by the presence or absence of the semicolon.&lt;/p&gt;
&lt;p&gt;I agree that at the time when you had to program in text mode in a 24 X 80 console screen real estate was expensive. But even back then you could change your video mode to 50 X 80, or something about that, and double your screen real estate. Besides, back then there were little compilers (any at all?) supporting exceptions, and it is my experience that braces tend to eat up disturbingly much space especially when you code exception handling using Allman.&lt;/p&gt;
&lt;p&gt;Today, however, screens have become big enough so you don't really have a screen real estate problem anymore. You can even use two screens if your development/debugging process or your code is very complex. So why use a style which degrades readability?&lt;/p&gt;
&lt;p&gt;Another issue about readability: usually when i experiment with a solution, or in the initial versions of prototype code I write ugly, long blocks. During such tests, I also edit this ugly code a lot, add logging, remove logging, add conditional code in some place, move it into another place, etc. It often happens during such ugly and dirty changes (I wouldn't call them quick, hoever), that I loose control over my braces. Using the proper indentation and the braces aligned like Allman, I don't have such a difficult time spotting a missing brace, and I can use the environment to reformat the code after a change. Now, with Kernel I'd surely have a hard time following opening braces in all sorts of positions (at the end of a for/if/while, maybe after a multiline test condition for an if. Using Allman all opening braces are easy to spot in the starting position of individual rows.&lt;/p&gt;
&lt;p&gt;I'm about to start writing a coding standard for internal use. I guess anybody can tell which style I'll recommend. The arguments presented by various ppl above surely helped me decide. until I reached this page, I was still thinking I must be missing somethign about Kernel if so mcuh code and so many coders use it. Now I think it's just a historically determined bad thing, like many others.&lt;/p&gt;</description></item><item><title>re: It's all a matter of style</title><link>http://blogs.msdn.com/danielfe/archive/2003/11/24/51893.aspx#2351260</link><pubDate>Tue, 01 May 2007 08:48:53 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2351260</guid><dc:creator>Jon</dc:creator><description>&lt;p&gt;K&amp;amp;R wins hands down for me.&lt;/p&gt;
&lt;p&gt;I used to be an Allman guy, since that seemed to be what most people were using. I then worked on a project which used K&amp;amp;R and was far more readable as a result.&lt;/p&gt;
&lt;p&gt;Like the person who commented before, I find it far easier to scan for if...} or while...} etc than {...}&lt;/p&gt;
&lt;p&gt;This is just plain horrible:&lt;/p&gt;
&lt;p&gt;try {&lt;/p&gt;
&lt;p&gt;...&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;catch ( ... )&lt;/p&gt;
&lt;p&gt;{&lt;/p&gt;
&lt;p&gt;...&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;I also find it near impossible to get an overall picture of the structure of Allman code since so little of it fits on the screen.&lt;/p&gt;</description></item><item><title>re: It's all a matter of style</title><link>http://blogs.msdn.com/danielfe/archive/2003/11/24/51893.aspx#2640771</link><pubDate>Tue, 15 May 2007 07:37:14 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2640771</guid><dc:creator>Pete</dc:creator><description>&lt;p&gt;K&amp;amp;R at all times.&lt;/p&gt;
&lt;p&gt;Also the style I remember from early C++ (C with Classes anyone?) &amp;nbsp;and Pascal.&lt;/p&gt;
&lt;p&gt;Perl let's you put if/while statements at the end or beginning of a statement to emphasize what's important.&lt;/p&gt;
&lt;p&gt;What's more important - that there's a block of code, or that there's a block of code that might execute, or will loop more than once? Emphasizing the opening statement seems much more sensible to me.&lt;/p&gt;
&lt;p&gt;Allman's style is good if you program for line counters, though. Especially when you do switch - case with braces.&lt;/p&gt;</description></item><item><title>re: It's all a matter of style</title><link>http://blogs.msdn.com/danielfe/archive/2003/11/24/51893.aspx#4632477</link><pubDate>Wed, 29 Aug 2007 21:59:57 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:4632477</guid><dc:creator>Mark Ross</dc:creator><description>&lt;p&gt;Anything except K&amp;amp;R. &amp;nbsp;I simply find it hard to read. &amp;nbsp;I have some odd SQL coding conventions that I follow, too, all in the name of readability.&lt;/p&gt;</description></item><item><title>re: It's all a matter of style</title><link>http://blogs.msdn.com/danielfe/archive/2003/11/24/51893.aspx#5447953</link><pubDate>Sun, 14 Oct 2007 07:00:22 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5447953</guid><dc:creator>Sd</dc:creator><description>&lt;p&gt;IfYouWantToKnowWhatI1Is &lt;/p&gt;
&lt;p&gt;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;read this;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;forget Allman&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;if_you_want_to_know_what_l1_is {&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;keep smiling;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;use kernel style;&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;Never understood why searching for '{' is an issue (unless you are trying to remove it); just look at indentation. And 8 spaces of indentation is a blessing for anyone prone to writing unnecessarily complicated, hence less maintainable code.&lt;/p&gt;
&lt;p&gt;Just my thoughts...&lt;/p&gt;</description></item><item><title>re: It's all a matter of style</title><link>http://blogs.msdn.com/danielfe/archive/2003/11/24/51893.aspx#7382639</link><pubDate>Sat, 02 Feb 2008 08:06:59 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7382639</guid><dc:creator>Jason Liang</dc:creator><description>&lt;p&gt;After I use Python, I enjoy programming in the K&amp;amp;R style.&lt;/p&gt;</description></item><item><title>re: It's all a matter of style</title><link>http://blogs.msdn.com/danielfe/archive/2003/11/24/51893.aspx#8961412</link><pubDate>Mon, 22 Sep 2008 20:50:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8961412</guid><dc:creator>Adeon Writer</dc:creator><description>&lt;p&gt;I need Allman style. If I even use a piece of code that isn't written in Allman style, I will make it Allman style. This is time consuming. I think of anyone who doesn't use Allman style as making more work on me to properly indent their code. ;) As far as how many spaces to indent, I'm not picky, so long as it's consistent throughout it's entire scope, and the matching brackets are equally indented.&lt;/p&gt;</description></item><item><title>re: It's all a matter of style</title><link>http://blogs.msdn.com/danielfe/archive/2003/11/24/51893.aspx#9488559</link><pubDate>Thu, 19 Mar 2009 03:29:48 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9488559</guid><dc:creator>GC</dc:creator><description>&lt;p&gt;Allman style, 2-space tabs. I use 4-space tabs in python since blocks are indicated by tabs instead of braces.&lt;/p&gt;</description></item></channel></rss>