NL.15: Use spaces sparingly
NL.15:谨慎使用空格
Reason(原因)
Too much space makes the text larger and distracts.
太多的空格会使文本变长并分散注意力。
Example, bad(反面示例)
#include < map >
int main(int argc, char * argv [ ])
{
// ...
}
#include <map>
int main(int argc, char* argv[])
{
// ...
}
Some IDEs have their own opinions and add distracting space.
一些IDE有自己的见解,并会增加分散注意力的空格。
This is a recommendation for when you have no constraints or better ideas. This rule was added after many requests for guidance.
当您没有约束或更好的做法时,考虑这个建议。此规则可以作为许多准则之外的附加要求。
Note(注意)
We value well-placed whitespace as a significant help for readability. Just don't overdo it.
我们认同合理放置的空格,这对于提高可读性具有重要帮助。只是不要过度使用它。
原文链接
https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#nl15-use-spaces-sparingly