我参与了编码标准的开发,这些标准非常详细。我自己的经验是,如果没有适当的过程来维护它和维护它的策略,就很难执行它。
现在,我正在工作,并领导着一个环境,在相当长的一段时间内,更不可能有流程和后续策略。不过,我还是想维护一些最低标准的可敬代码。因此,我想我会在这里得到好的建议,我们可以一起产生一个合理的轻量级子集,这是最重要的编码标准实践,供其他人参考。
所以,这里要强调的是:
C++编码标准中最关键的元素是什么?
- 1 candidate per answer, preferably with a **brief** motivation.
- **Vote down** candidates which focuses on style and subjective formatting guidelines. This is not to indicate them as unimportant, only that they are less relevant in this context.
- **Vote down** candidates focusing on how to comment/document code. This is a larger subject which might even deserve its own post.
- **Vote up** candidates that clearly facilitates safer code, which minimizes the risk of enigmatic bugs, which increases maintainability, etc.
- **Don't cast your vote** in any direction on candidates you are uncertain about. Even if they sound reasonable and smart, or on the contrary "something surely nobody would use", your vote should be based on clear understanding and experience.
https://stackoverflow.com/questions/242728
复制相似问题