Subj : Re: Is well written code a rare species ? To : comp.programming From : akarl Date : Mon Aug 15 2005 08:53 pm Joe Butler wrote: > At the end of the day, the different styles add some variety - I wouldn't > constrain my programmers to such rigid rules. I can easily identify the > author of a function or bug fix just by looking at the subtle differences > that each coder leaves behind (a sort of genetic fingerprint in ascii). I > find that useful because it's then possible to go straight to the coder in > question if there are issues. I can live with most of them except > 'compressed' coding is fatiguing to deal with and 'exploded' coding styles > are just annoying because I can't understand the reasoning behind the style > and I guess I find it a little less scannable than other code. > > // compressed (no spaces) yet, inexplicably, the braces > // are each placed on a line of their own - totally weird to me. > for(x=0,y=0;x { > > } > > // exploded code > for ( x = 0 , y = 0 ; x < n ; ++ x , ++ y ) { > > } > > // my own 'style' > for(x= 0, y= 0; x < n; x++, y++){ > > } > > // not me cos of the pre-increment > // I know, it's more efficent (sometimes) > for (x= 0, y= 0; x < n; ++x, ++y) > { > > } If we're talking C, GNU Indent makes everyone happy. August .