You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 9, 2018. It is now read-only.
Line comments are easy to spot compared to block comments (barring syntax highlighting, but we shouldn't assume everyone has perfect syntax highlighting always - especially in, e.g., a code diff).
Line comments make it easier to keep consistent indentation. This is especially relevant in Markdown documentation, which is indentation-aware.
Though I think the choice is mostly arbitrary; we're forced to "pick one and make it a convention;" the Google C++ Style Guide remarks that:
Use either the // or /* */ syntax, as long as you are consistent.
You can use either the // or the /* */ syntax; however, // is much more common. Be consistent with how you comment and what style you use where.
The argument that "// is much more common in Rust" (much like above) is IMO the best argument in its favor, however. When it comes to code style, "my way is popular" is the most important justification you could have.
The pure style (non-API) part of the guidelines need a complete overhaul and RFC laying out the rationale, IMO. But no one has had the time to do this yet.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
It just says to use line comments but not why.
The text was updated successfully, but these errors were encountered: