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
This seems to be a very broad guide on writing good C++, so what exactly does “adopt” mean here? Also, some of these are incompatible with our own existing guidelines (e.g. use of non-const references).
From a community POV, having an explicit and concise "guidebook" to C++ can be a huge benefit for newcomers (and current contributors who want to expand to C++). Especially since C++ is so expressive and flexible, even after learning the language knowing what is the right way to do something is very hard.
I don't believe we need/can/should refactor the existing code. IMHO it's similar to when we discussed ES-next, i.e. when writing new code or fixing existing code, CCG guidelines should take precedence.
We still use -std=gnu++0x on v8.x -- Are the guidelines compatible (bearing in mind backports)?
@richardlau, most of the clauses in the CCG are stylistic, and do not necessarily require new language features. They do at times recommend new features, but explain why, and how to handle legacy situations.
We need as always to balance comfort and progress with code backportability.
v8 will enter maintenance in ~6 months, so it's not that far away. Also in C++ code we have the compiler (not just git) to verify that backported changes are consistent.
This seems to be a very broad guide on writing good C++, so what exactly does “adopt” mean here?
@addaleax IMHO “adopt” means accepting those guidelines as the default. Reviewing PRs with the CCG in mind, and requesting explanations when authors overrules them.
There are also tools (MSVS, and clang-tidy) that help check and flag situations that are covered by the CCG. We could incrementally add those.
Also, some of these are incompatible with our own existing guidelines (e.g. use of non-const references).
A quote from the Google Style guide: The C++ version targeted by this guide will advance (aggressively) over time. We could agree that some of our current guidelines need to be updated.
At least from what I read, every clause in the guide comes with reasonings, pro and con. IMHO the ISO committee and the people behind the CCG are some of the most experienced in the field, so I'm assuming their reasoning is sound.
How about we start by adding this as a recommendation to read/look up from our style guide file? It’s a very comprehensive work, so while it certainly can help newcomers, we can’t expect them to be familiar with all of it.
Activity
richardlau commentedon Sep 14, 2018
We still use
-std=gnu++0xonv8.x-- Are the guidelines compatible (bearing in mind backports)?addaleax commentedon Sep 14, 2018
This seems to be a very broad guide on writing good C++, so what exactly does “adopt” mean here? Also, some of these are incompatible with our own existing guidelines (e.g. use of non-const references).
refack commentedon Sep 14, 2018
From a community POV, having an explicit and concise "guidebook" to C++ can be a huge benefit for newcomers (and current contributors who want to expand to C++). Especially since C++ is so expressive and flexible, even after learning the language knowing what is the right way to do something is very hard.
I don't believe we need/can/should refactor the existing code. IMHO it's similar to when we discussed ES-next, i.e. when writing new code or fixing existing code, CCG guidelines should take precedence.
@richardlau, most of the clauses in the CCG are stylistic, and do not necessarily require new language features. They do at times recommend new features, but explain why, and how to handle legacy situations.
We need as always to balance comfort and progress with code backportability.
v8 will enter maintenance in ~6 months, so it's not that far away. Also in C++ code we have the compiler (not just git) to verify that backported changes are consistent.
@addaleax IMHO “adopt” means accepting those guidelines as the default. Reviewing PRs with the CCG in mind, and requesting explanations when authors overrules them.
There are also tools (MSVS, and clang-tidy) that help check and flag situations that are covered by the CCG. We could incrementally add those.
A quote from the Google Style guide: The C++ version targeted by this guide will advance (aggressively) over time. We could agree that some of our current guidelines need to be updated.
At least from what I read, every clause in the guide comes with reasonings, pro and con. IMHO the ISO committee and the people behind the CCG are some of the most experienced in the field, so I'm assuming their reasoning is sound.
addaleax commentedon Sep 16, 2018
How about we start by adding this as a recommendation to read/look up from our style guide file? It’s a very comprehensive work, so while it certainly can help newcomers, we can’t expect them to be familiar with all of it.
refack commentedon Nov 13, 2018
Fixed by 0f8eaa4 (#23317)