isocpp / isocpp/CppCoreGuidelines
NL 10: suggest actual stdlib-conventions
@gdr-at-ms is already working on this.
Since May 15, 2017.
- Dominant language
- CSS
- Stars
- 45.3k
- Forks
- 5.6k
- PR merge metrics
- No merged PRs in 30d
Description
Especially NL 10 already provides some guidance with regards to picking naming conventions if you have a choice. I would like for them to actually recommend the usage of stdlib-naming conventions in the hope of providing clear instructions for those who search for them. Picking the namingconventions of the standard-library is the only non-arbitrary choice and I believe that doing so is worth it for the following reasons:
- Consistency. Almost everyone is going to use the stdlib and many are going to use boost. Therefore the only way to introduce as much consistency to the C++-world as possible, is to actually recommend those.
- It will allow the distinction of functions from function-templates, once Concepts are wildly used. Without following this recommendation, it will be close to impossible to tell which it is from looking at it. This get's even more important if we keep in mind that templates should be defined in the header
- The rationale “do, whatever the standard-library of your language does” is easy to explain, intuitive and followed in almost every other language, therefor recommending it, is only consequent.
- (In a language where objects can also serve as functions, the lines are somwhat blurred to begin with, making a distinction via the name somewhat less important)
As far as I see, these are all the arguments for one style that are not “but I like $STYLE better”.
I don't think that adding that to the guidelines will make them in any way more problematic, as NL 10 is already mentions that it only applies if there is a choice. It may however help in getting to the point where one day, maybe, projects may have code with an entirely consistent style (which is the case in almost every other language, I want it in C++ too).
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.