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

David Holmes david.holmes at oracle.com
Thu Jul 2 00:28:35 UTC 2020


On 2/07/2020 3:16 am, Kim Barrett wrote:
>> On Jun 28, 2020, at 8:08 PM, David Holmes <david.holmes at oracle.com> wrote:
>>
>> 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.
> 
> I'm going to claim these are not abbreviations in the usual sense, but
> rather are well-known terms of art. And this document is not targeted
> at an audience unskilled in the art.

I'm sure for some, perhaps many, C++ template practitioners that SFINAE 
is a blindingly obvious term/concept/whatever, but for others it will 
not be. I can neither readily recall what it expands to, nor what 
underlying principle it refers to.

> That's particularly true for SFINAE; I suspect most people (including
> me) have to stop and think about it to correctly recall its expansion,
> and nobody actually uses or cares about the expansion. Even more so
> for "Expression SFINAE"; one would never say or write "Expression
> Substitution Failure...".

I think "Expression SFINAE" is a grammatically meaningless phrase.

> Books on C++ (such as Dewhurst's "C++ Common Knowledge") will give the
> expansion almost as an aside, but "SFINAE" is the section title and
> index entry.

And that is not completely unreasonable for a book on C++ that wants to 
focus on the vocabulary of C++ practitioners. But I note that even the 
person credited with at least popularising, if not introducing, this 
term did so thusly [1]:

'This "substitution-failure-is-not-an-error" (SFINAE) principle is 
clearly an important ingredient to make the overloading of function 
templates practical.'

[1] C++ Templates: The Complete Guide, Book by David Vandevoorde and 
Nicolai M. Josuttis

> I'm considering going back to always using the "term" in normal text,
> with a parenthetical expansion on first use. I find the latest
> approach jarring, as the specialized terms are the normal usage.

Only if you think this document's audience is C++ experts who happen to 
be working on hotspot, rather than hotspot developers who will have a 
wide range of experience in C++. I obviously consider it to be the latter.

Cheers,
David
-----


More information about the hotspot-dev mailing list