From: Gary Powell (Gary.Powell_at_[hidden])
Date: 2001-07-17 12:27:38
I don't think that code formatting and commenting are irrelevant to quality.
Source code is fundamentally there for communication with human readers.
Otherwise we'd just compile it and throw the source away.
I do agree that code should be formatted so that it is readable by its
intended audience. However whether you put your braces at the end of the
statement, on the next line, indent them or not doesn't matter to me. I can
read it all. It does help if the source is consistent for at least the full
definition of a function, but its not essential. And yes there were
proposals to build a "source" definition of the code that didn't have ANY
formatting, but rather formatted it how the user set their own perquisites.
So in order to make things clear. I vote NO, to accepting these guidelines.
They are useful, but they will be seen as mandates and while I don't mind if
authors follow them, I don't want to reject a source library because it
didn't follow them exactly. The review process itself will force the issue.
As in reviewers comments to "unclear style," meaning illegible code.
For instance I used to distain MACRO's and here boost just accepted a
library that is nothing but MACRO's! (The preprocessor library.) A very
handy library, one of which I'm tempted to re-write my code to use. I used
to force all code into an 80 column space for viewing on a VT100. Without a
compiler which does the zero byte size overhead for inheritance correctly I
won't use the "noncopyable" or the other operator classes. I don't want to
be forced to give up reasonable alternatives just because there is a
OTOH. if a library is going to part of the "std" "standard" then these sort
of inheritance issues can be fixed, and compilers that don't adhere can suck
eggs. (Or use the older depreciated boost version.)
I've been to the religious wars of formatting and I have no desire to
return. It's hard enough to get people to just use C++ the whole language,
never mind force them to format their code in a specific way. The only
successful caveat, was I once had some tools that only read code/comments in
predermined formatting and used it to generate automatic documents. And I
don't want to impose those formatting standards on the rest of the world.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk