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

David Holmes david.holmes at oracle.com
Mon Jun 29 00:08:52 UTC 2020


Hi Kim,

Updates look good. One minor nit, titles should not use abbreviations 
that have not yet been defined

e.g.

  #### RTTI (Runtime Type Information)

should just be

  #### Runtime Type Information

(you don't introduce abbreviations in headings/titles either).

And:

#### Expression SFINAE

also needs fixing - though simply expanding SFINAE doesn't really make 
sense as it seems to be being used as a verb, which seems odd in itself. 
I don't know how to rewrite that title in a meaningful way. I suppose 
one way around this would be to say:

#### Expression "SFINAE"

though even that is a stretch.

Thanks,
David
-----

On 27/06/2020 6:01 pm, Kim Barrett wrote:
>> 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