RFC: 8247976: Update HotSpot Style Guide for C++14 adoption

Kim Barrett kim.barrett at oracle.com
Sat Jun 27 08:01:42 UTC 2020


> On Jun 26, 2020, at 9:54 AM, David Holmes <david.holmes at oracle.com> wrote:
> 
> Hi Kim,
> 
> On 26/06/2020 8:21 pm, Kim Barrett wrote:
>> I've made updates for comments from John and Stefan.  I also made a
>> couple of terminology fixes; this document is about C++, not Java,
>> and should use terminology accordingly.
>> full: https://cr.openjdk.java.net/~kbarrett/8247976/hotspot-style.01/
>> incr: https://cr.openjdk.java.net/~kbarrett/8247976/hotspot-style.01.inc/
> 
> I looked at the incremental. I like the x-ref to the cpp-reference docs for things like RAII and ADL and SFINAE, and it is nice that in a browser the acronyms expand when you hover over the abbreviation, but I would like to see them always expanded in text, so that if it were printed then you can see what they mean. These are normal grammatical writing rules: you introduce something in full, show the abbreviation, and there after can use the abbreviation in place of the full text. E.g.
> 
> 419 #### RTTI (Runtime Type Information)
> 420
> 421 Do not use [RTTI][4] .  RTTI is disabled by the build configuration for some
> 
> should be:
> 
> 419 #### Runtime Type Information
> 420
> 421 Do not use [Runtime Type Information][4](RTTI) .  RTTI is disabled by the build configuration for some

Done, I think.

> 483 anonoymous namespace symbols, so can't set breakpoints in them &etc.
> 
> Typo: anonoymous
> Typo: &etc.

Done.  I also reran spell checking.  (Apparently haven’t done that for a while.)

> Bad link: https://firefox-source-docs.mozilla.org/tools/lint/coding-style/coding_style_cpp.html

Fixed, as well as another mozilla link that needed updating.

> (I'm not sure how relevant those links in the namespace section are these days but that's a different issue.)

The last time I checked carefully (a couple years ago) the discussed problems
all still seemed to exist.  A quick spot check today suggests there might have been
improvements since then.  But I’m going to leave anonymous namespaces in the
out column (that was implicitly more or less the previous status quo, in that there
are almost no uses in our code) and let someone who wants to propose using them
do the relevant research.

New webrevs:
full: https://cr.openjdk.java.net/~kbarrett/8247976/hotspot-style.02/
incr: https://cr.openjdk.java.net/~kbarrett/8247976/hotspot-style.02.inc/



More information about the hotspot-dev mailing list