Subj : Re: Is well written code a rare species ? To : comp.programming From : Chris Sonnack Date : Mon Aug 15 2005 12:49 pm Joe Butler writes: > Your book example is a classic non-sequitur. Books have nothing > to do with code layout... Well, the connection--which has already been discussed, I beleive-- is just that overly long lines are harder on the eyes than short ones. Newspapers are printed in columns, in part, for that very reason. > type > function name( > type parameter1, // comment > type parameter2, // comment > type parameter3 // comment > type parameter4 // comment > ){ > blah blah > } I'm assuming "function name" is the function_name (or did you mean something else? or does your language allow spaces in names?). I'm assuming you meant this: return_type function_name ( [...] Which is a style I also favor. Buys just a little more room on the function declaration line itself, PLUS it makes it very easy to search for the function definition--just search for where the name is on the left margin. I notice what I assume is a a typo above--a missing comma. To make those easier to spot, I often do something like this: return_type function_name ( type parameter1 , type parameter2 , type parameter3 , type parameter4 ) { blah, blah, blah... } I've learned over the years that the more *visual* structure I can put in code, the easier it is to work with. -- |_ CJSonnack _____________| How's my programming? | |_ http://www.Sonnack.com/ ___________________| Call: 1-800-DEV-NULL | |_____________________________________________|_______________________| .