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

Jesper Wilhelmsson jesper.wilhelmsson at oracle.com
Sat Jun 27 08:37:05 UTC 2020


> On 26 Jun 2020, at 14:07, Kim Barrett <kim.barrett at oracle.com> wrote:
> 
>> On Jun 24, 2020, at 3:01 PM, Jesper Wilhelmsson <jesper.wilhelmsson at oracle.com> wrote:
>> 
>> I agree that the Developers' Guide would be a good place for this document. There is already a discussion on guide-dev about including the Java coding style guide and there are plans to add style guides for our Markdown and Makefiles as well.
>> 
>> If we can reduce the number of places one has to look to find this kind of information I think everyone will benefit in the end.
> 
> That's an interesting idea. The Developers' Guide is a new Project and
> I haven't had much time to pay attention to it. Also, some of the
> early discussion and the Charter suggested to me it wasn't the place
> for this kind of document. For example, "It contains tutorial-style
> text that provides step-by-step directions..." and I would in no way
> describe the HotSpot Style Guide that way. But I've now found other
> discussion in the other direction.

Personally I think the coding style guides would fit perfectly in the Developers' Guide. We'll see what happens with the Java style guide, but regardless I think we can have the other language style guides in there (C/C++, Makefiles, Markdown) since these won't attract the same attention from people outside the community.

> I think hosting this document somewhere other than the current wiki
> page would be beneficial for a number of reasons.
> 
> One concern I have with hosting in the Developers' Guide is that the
> new HotSpot Style Guide is at least somewhat version specific;
> substantial chunks of it do not apply to earlier JDK releases (unless
> someone does the hard work of backporting C++14 support and forcing
> required compiler versions forward and such).  Any idea how that might
> be addressed?

I don't see that as a problem as long as the style guide clearly state that it's focused on C++14 and its applicability to older C++ versions may vary. (or something like that)  If someone has the time at some point in the future we can add some C++14 label to places where the guide specifies something that is only applicable to C++14.

> I'm also not sure I understand how "ownership" and decisions around
> updates work for the Developers' Guide. There's never been a clear
> mechanism for updating the HotSpot Style Guide, so the new document
> contains a proposal for such. But that might be incompatible with the
> Project's processes. In particular, I think it's important that the
> HotSpot Style Guide "belongs to" the HotSpot Group.

Right now we aren't that many Reviewers, but I recon the principle should be the same as for the JDK, the changes should be reviewed by someone that "belongs" to that area. So any changes to the C++ style guide should be reviewed by a set of people from the HotSpot Group - I know who to ping ;-)

Hth,
/Jesper



More information about the hotspot-dev mailing list