Coding style guidelines: Allow for C++ style comments: `// ...`
jmark opened this issue · comments
As of now, t8code guidelines enforce the old C commenting style /* ... */
.
I propose to relax this.
Why?
Google favors //
: https://google.github.io/styleguide/cppguide.html#Comment_Style
An excerpt from here: https://github.com/mcinglis/c-style?tab=readme-ov-file#use--comments-everywhere-never---
Stick to single-line comments, and cut the complexity. Compared to single-line comments, multi-line comments:
- are rarely used with a blank margin, so they're just as character-heavy
- have a style, which has to be specified and adhered to
- often have
*/
on its own line, so they're more line-expensive - have weird rules about embedded
/*
and*/
- are harder/impossible to block-edit, and to extend
- are more visually-cluttering than
//
You have to use /* ... */
for inline comments in multi-line #define
s, though:
#define MAGIC( x ) \
/* Voodoo magic happens here. */ \
...
Follwing our Developer Meeting we allow C++-Style comments from now on.