This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: Questions regarding systemtap's C++ coding style
- From: fche at redhat dot com (Frank Ch. Eigler)
- To: agentzh <agentzh at gmail dot com>
- Cc: Josh Stone <jistone at redhat dot com>, systemtap at sourceware dot org
- Date: Wed, 12 Jun 2013 13:57:26 -0400
- Subject: Re: Questions regarding systemtap's C++ coding style
- References: <CAB4Tn6NnKyBMmrcneMzxkK=-rMdQKyjxxHcSdmqTw1rbyCTOMg at mail dot gmail dot com>
agentzh <agentzh@gmail.com> writes:
> I have some dumb questions regarding the C++ coding style used in the
> systemtap project because there's lots of inconsistencies in the
> current C++ code base. [...]
We try not to worry about this too much.
> 1. For method/function declarations/definitions, is a white space
> required between the function name and the opening parenthesis? For
> example,
> void foreach_loop::print (ostream& o)
> is the white space required between "foreach_loop::print" and "("? [...]
> Also, how about function calls?
We usually add a space.
> 2. Should (expanded) whitespaces be used consistently for indentation?
> I'm currently seeing a mixture of tabs and whitespaces.
As long as the tabs are usual 8-space ones, it doesn't matter.
> 3. Is it desired to update the code base to be more consistent in
> coding style?
I wouldn't say "desired", nor "undesired". How about "indifferent"?
> Because I'd really like to contribute to systemtap, I want to be sure
> about the project's coding style first :)
Usually, matters other than whitespace govern the acceptability of
contributions.
- FChE