Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

C++ Core Guidelines #1218

Open
pcarruscag opened this issue Mar 3, 2021 · 2 comments
Open

C++ Core Guidelines #1218

pcarruscag opened this issue Mar 3, 2021 · 2 comments

Comments

@pcarruscag
Copy link
Member

I would like to bring your attention to the existence of this gem:
https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#main

Of which I use maybe a subset in my often verbose and perhaps repetitive code reviews.
The things I comment on are as much a matter of style as multiplication taking precedence over addition is.
It is how "They" do it.

So do please browse the guidelines.
Ingraining some good guidelines, goes a long way towards freeing one's mind to focus on important implementation aspects.
Does this thing need to be const? Just make it, the compiler will tell you if it can't or if you were about to have a bug, the opposite does not happen.
I need this piece of code from somewhere. -> Put it in a function.
My function does not fit the screen. -> Too long.
new su2double[nSomething] -> Some container type, which one? The simplest that will do the job.
etc.

@pcarruscag
Copy link
Member Author

Passing arrays by pointer -> don't https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Rr-use-ptr
Variables declared at the top of the function -> https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Res-introduce
Using member variables to "pass data" to other methods -> https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Ri-explicit

"What are important implementation aspects?" You ask -> https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#per7-design-to-enable-optimization

@pcarruscag pcarruscag pinned this issue Mar 3, 2021
@stale stale bot added the stale label Jun 2, 2021
@stale stale bot closed this as completed Jun 9, 2021
@su2code su2code deleted a comment from stale bot Jul 21, 2021
@WallyMaier WallyMaier reopened this Jul 21, 2021
@stale stale bot removed the stale label Jul 21, 2021
@stale stale bot added the stale label Oct 11, 2021
@su2code su2code deleted a comment from stale bot Oct 11, 2021
@stale stale bot removed the stale label Oct 11, 2021
@su2code su2code deleted a comment from WallyMaier Jan 14, 2022
@pcarruscag
Copy link
Member Author

[WIP]
SU2-specific best practices (carried over from #1487)

@stale stale bot added the stale label Apr 16, 2022
@su2code su2code deleted a comment from stale bot Apr 16, 2022
@stale stale bot removed the stale label Apr 16, 2022
@ChristianBauerEng ChristianBauerEng unpinned this issue Apr 26, 2022
@pcarruscag pcarruscag pinned this issue May 2, 2022
@stale stale bot added the stale label Jul 10, 2022
@su2code su2code deleted a comment from stale bot Jul 10, 2022
@pcarruscag pcarruscag removed the stale label Jul 10, 2022
@stale stale bot added the stale label Nov 2, 2022
@WallyMaier WallyMaier removed the stale label Nov 2, 2022
@su2code su2code deleted a comment from stale bot Nov 2, 2022
@stale stale bot added the stale label Jan 7, 2023
@su2code su2code deleted a comment from stale bot Jan 7, 2023
@pcarruscag pcarruscag removed the stale label Jan 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants