Into and C++ updates#14
Conversation
| code is a product that is distributed to the public and hopefully will be used by many | ||
| people outside of the collaboration. Incosistent code styles makes it harder for | ||
| contributors and users to read, understand and reuse code. A developer and style | ||
| guide aims to lower this friction. |
There was a problem hiding this comment.
Do you want to say something here about us requiring the use of source formatters also reducing spurious diffs from purely stylistic changes and hence reducing maintainer burden during code review?
|
@JBorrow can you take another look? I'm looking at common section and I will need to overhaul it. It contradicts the intro a lot. |
JBorrow
left a comment
There was a problem hiding this comment.
Generally happy apart from a couple of minor typographic items
| formatting Argue about C/C++ formatting. | ||
| Although there are many C++ style guides, and there is no single "correct" way to | ||
| write C++, we will adopt a modified Google C++ style guide. For any rule not explicity | ||
| specified in this document, please refer to the Google [C++ style guide](https://google.github.io/styleguide/cppguide.html) |
| write C++, we will adopt a modified Google C++ style guide. For any rule not explicity | ||
| specified in this document, please refer to the Google [C++ style guide](https://google.github.io/styleguide/cppguide.html) | ||
|
|
||
| In addition to the style description, we will provide a config file for clang-format |
There was a problem hiding this comment.
It would be good to link to this file or include it here.
mhasself
left a comment
There was a problem hiding this comment.
Good start! Couple minor comments.
I think leaning into an existing C++ style guide, and then only calling out major divergences, is a good approach.
Can we (officially) use #pragma once ?
| not formatted according to the style, you can maintain the existing style. However, | ||
| we higlhy recommend to format the code in a different branch and submit a pull request. |
There was a problem hiding this comment.
"highly"
But more importantly, please clarify that bulk reformatting must be done separately from any changes in functionality.
With "highly recommend" it's not clear whether you recommend people reformat the code, or that you recommend that if they reformat the code, they do it in a dedicated branch / PR.
I hestitate to get behind the first recommendation; and the latter is basically a requirement.
There was a problem hiding this comment.
It is part of the common section, but I wanted to highlight here as well. I'll change the wording.
| ------------------ | ||
|
|
||
| The name of a variable, function or class is one of the most important aspects of code | ||
| readability. It can immediately inform about the puspose of the named thing. Please avoid |
Helped by Claude Sonnet 4.6
|
There are a few changes based on the discussion on PR #15, so I would like to see if you agree with them before I merge and continue with the rest. Thank you |
This PR updates the intro of the dev guide and the C++ guide.