> From my point of view, I will go with the project consensus if there is one. 
> I prefer the latter, and this is all based on what Mr C++ himself suggests 
> and strongly recommends in [1] (if the project was written in C I would go 
> with the former). In Steve's example, p is a Port pointer, and declaring 
> multiple non-trivial variables (like pointers) on a single line is bad coding 
> style anyway.
>
> [1] Stroustrup, Bjarne. The C++ Programming Language. 2nd Edition, p. 52. 
> Addison-Wesley.

Personally, I agree with Andreas on all points.  That said, I prefer
consistency at least at the whole-file level.  So I could agree to
something like, use whatever the file has and if you want to change,
you must change them all in that file.

One additional thing I like about the "new" style is that it's easier
to do regex because people sometimes play with whitespace to line
things up.  (this won't work with a proportional font, but you'll get
the idea):

int                 a;
FooType        b;
char               *c;


That screws up your regex, especially if you see tabs and spaces.  I
don't have a problem rejecting that kind of lining up thing out of
hand of course :)

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

Reply via email to