Thank you!
This is one interesting change.
<p>Prefer to use a <code>struct</code> instead of a pair or a
tuple whenever the elements can have meaningful names.</p>
<p>
While using pairs and tuples can avoid the need to define a custom type,
potentially saving work when <em>writing</em> code, a meaningful field
name will almost always be much clearer when <em>reading</em> code than
<code>.first</code>, <code>.second</code>, or <code>std::get<X></code>.
While C++14's introduction of <code>std::get<Type></code> to access a
tuple element by type rather than index (when the type is unique) can
sometimes partially mitigate this, a field name is usually substantially
clearer and more informative than a type.
</p>
<p>
Pairs and tuples may be appropriate in generic code where there are not
specific meanings for the elements of the pair or tuple. Their use may
also be required in order to interoperate with existing code or APIs.
</p>
And this one may come up:
<li>For a function parameter passed by value, <code>const</code> has
no effect on the caller, thus is not recommended in function
declarations. See <a href="
https://abseil.io/tips/109">TotW #109</a>.
As well as the removal of the request to use `0.0` instead of `0` for real numbers.
- <p>Use <code>0</code> for integers, <code>0.0</code> for reals,
But is replaced by some new guidance:
<p>Floating-point literals should always have a radix point, with digits on both
sides, even if they use exponential notation. Readability is improved if all
floating-point literals take this familiar form, as this helps ensure that they
are not mistaken for integer literals, and that the
<code>E</code>/<code>e</code> of the exponential notation is not mistaken for a
hexadecimal digit. It is fine to initialize a floating-point variable with an
integer literal (assuming the variable type can exactly represent that integer),
but note that a number in exponential notation is never an integer literal.
</p>
<pre class="badcode">float f = 1.f;
long double ld = -.5L;
double d = 1248e6;
</pre>
<pre class="goodcode">float f = 1.0f;
float f2 = 1; // Also OK
long double ld = -0.5L;
double d = 1248.0e6;
This advice is new:
Generally speaking, descriptiveness should be
proportional to the name's scope of visibility. For example,
<code>n</code> may be a fine name within a 5-line function,
but within the scope of a class, it's likely too vague.</p>
Advice to use DEPRECIATED comments is gone. We don't generally use these anyhow AFAIK.
- <p>Mark deprecated interface points with <code>DEPRECATED</code>
comments.</p>
- <p>You can mark an interface as deprecated by writing a
- comment containing the word <code>DEPRECATED</code> in
- all caps. The comment goes either before the declaration
- of the interface or on the same line as the
- declaration.</p>
That's what I found in the diff :)
Dana