> Go ahead then. I think its easy to go overboard with style rules.
I agree with that.  Honestly though our style guide is pretty trivial.
 Check out google's:
http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml
If you ever have a chance to find David Cheriton's, it's crazy.
You'll notice that my include ordering and spacing matches the google
style guide,
I didn't base ours off theirs so it's a bit of a coincidence, but it's
a pretty common idea.
One of the main reasons to have a consistent style is that it makes
simple sed/grep type
commands work easily.

> When I
> read code online that doesn't conform to our (or possibly any) style
> guide, I can still read it without too much difficulty, and if we add
> too many rules we burden ourselves more than we help ourselves.
I don't think that any one style guide is right.  They have different benefits
and drawbacks. The only code that I find difficult to read is code with really
long lines, code that is overly dense, and code that is not consistent at all.

> But I
> suppose from your description it doesn't sound like it would get in the
> way that often.
I honestly don't believe that it will.  One huge plus is that it
allows me to write simple scripts to fix up the code.  Remember when
you did the PCState change and then we requested a change to the
interface?  I bet that it took an hour to just update all of the code
with some of the trivial changes.  I've done that a lot with
file/directory renames (many times) and then having the headers all
messed up is annoying and takes work to fix.

  Nate
_______________________________________________
m5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/m5-dev

Reply via email to