[bind10-dev] a bikeshed style question: parenthesize return values?

JINMEI Tatuya / 神明達哉 jinmei at isc.org
Tue Jun 22 18:37:10 UTC 2010


I've noticed we are not consistent on whether or not to parenthesize
return values in our C++ code.  We have both:

    return (val);
and
    return val;

I personally follow the former, simply because it's the suggested
style of BIND 9 (see "Spaces" of
http://bind10.isc.org/wiki/BIND9CodingGuidelines).
But it doesn't explain why we should parenthesize them.

And, in fact, it seems to me the style of "not parenthesize return
values" is more common especially for C++.  google's coding guideline
suggests this style:
http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml?showone=Return_Values#Return_Values
(although it doesn't explain why it's preferred)

It's a very minor issue, but as a big fan of consistency I'd like to
make it consistent in BIND 10 especially if it's a matter of
preference.  It looks like it's (almost) only me who follows the BIND
9 style, and if so, I'm happy to switch to the "don't parenthesize"
style.

Is there any comment on this, especially if it's more than a mere
preference?

---
JINMEI, Tatuya



More information about the bind10-dev mailing list