|
From: Dirck B. <lis...@da...> - 2010-06-23 23:17:26
|
On 6/23/2010 3:22 PM, Jim Barry wrote: > On 2010-06-23 22:39, Stephan Assmus wrote: > > ... >> In any case, discussions about the perfect style have a great potential to go out of hand >> > How true. > > Style discussions quickly devolve into religious arguments. >> In general, though I am perfectly happy with the AGG coding style. Changing an entire code base with a decent style to another style could also be considered a waste of time. >> > Absolutely. Even though I don't like using indent, for a project with many contributors, I would suggest what the Kernel guys do: come up with a command line for indent that approximates what the current AGG style is, and stick to that. > Yes, other than the fixed-pitch whitespace alignment, I don't have a > problem with it. > > "You young whippersnappers and your proportional fonts." Boost says: "no tabs". Here: http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml#Spaces_vs._Tabs My only hard and fast style rule: * Tabs are 8 spaces, not 2, not 4 * Don't use them. This may seem old fashioned, but it's old fashioned for good reason. I've lost track of how many times I've looked at source code and had to fuss with the editor trying 2 or 4 or 8 until the code sort of "looks right", and how many times the result is actually inconsistent because different authors of the same module used different settings. Tabs rely on out of band information for correct formatting. Until *everyone* is coding in a wysiwig literate programming editor, stick to 7 bit ascii text (as much as possible) with no tabs (EVER). |