Skip to content

Commit 5765748

Browse files
explain the reason behind commenting style convention
1 parent 9cc906a commit 5765748

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

doc/src/dev/coding_style.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,14 @@ Incorrect usage:
188188
189189
/* Non-Doxygen block comment */ // Not permitted
190190
191+
.. note::
192+
193+
This strict separation between `/* ... */` and `//` comments is designed to improve readability and reduce mistakes.
194+
Using `/* ... */` only for Doxygen documentation makes it clear at a glance which comments are meant for generated docs,
195+
and which are for developers reading the code. When Doxygen (or similar) comments are visually distinct from inline implementation comments,
196+
it's harder to accidentally generate incomplete or misleading API documentation.
197+
198+
191199
When to Comment
192200
---------------
193201

0 commit comments

Comments
 (0)