Before we change the coding standard, I suggest that we get more
feedback from the dev community.
My opinion: If a loop does not require a body, I suggest to use
braces, rather than a semicolon, because it is less prone to
programmer error. ...
I should not be so opposed to coding standard changes. But I think it
is important that we have some fair process to manage the coding style.
The specification is just a file in the repository, but I think it needs
stricter controls and more agreement than one person submiting a PR and
a committer merging it. That is insufficient. Concurrence by the
community and at least a majority of the PPMC is required, I think.
Errors and typos in the spec don't need this formalism, but I think that
coding standard requirement changes need to go through a fairly rigorous
process to avoid the nightmare of one person's or one organization's
preference dominating the specification without consensus from the
community. I think that this kind of formalization is mandated in the
INVIOLABLES.txt:
/Clear, Consistent, Standardized Coding Style//
//--------------------------------------------//
//
// o Strict conformance to the NuttX coding style. No
"revolutionary"//
// changes to the coding standard (but perhaps some "evolutionary"//
// changes).//
// o Personal or organizational preference is not a justification
for a//
// coding style change.//
// o Nothing can come into NuttX that does not follow the coding
standard.//
// o Expediency is not a justification for violating the coding
standard.//
//
// The NuttX coding standard can be found here://
//http://www.nuttx.org/doku.php?id=documentation:codingstandard/
The general use of braces in {while, do, for, if} is certainly
"evolutionary" and does have merit (Note the bad URL in INVIOLABLES.txt).
My proposal is that we have an open, formal [DISCUSS] and [VOTE] phases
on the dev list to make such decisions. Many people are used to other
foreign coding styles. NuttX has its own coding style that should be
retained (no "revolutionary" changes). We need to make sure that we
keep all coding style changes in the spirit of the NuttX coding style
(like all braces on same line -- that is just not in the spirit).
Adaptation to the NuttX coding style is expected from all contributors
and the coding standard should not be manipulated to be more like the
other projects we worked on in the past.