On Tue, 10 Sep 2024 14:15:53 GMT, Gerard Ziemski <gziem...@openjdk.org> wrote:

> Is everyone OK with `MT` as the template parameter name? Another obvious 
> choice is `MEM_TAG`
> 
> Side note: why are template parameter names all capitals? To help distinguish 
> them from "regular" parameters? Do we still want that naming scheme, or can 
> we switch here to using `mem_tag`?

Type template parameters should follow the style guide rules for type names.  
I've not noticed many (any?) cases of
noncompliance.

Non-type template parameters should follow the style guide rules for ordinary 
local variables, or perhaps local
constants.  The style guide doesn't currently say which, doesn't discuss 
possible differences between local and
non-local naming, and is also currently loose on constant names.  (The GC team 
recently discussed constant
naming, strongly preferring MixedCase, and strongly disliking ALL_CAPS.)  I 
think I've mostly use local variable
style.  Non-type template parameters are sometimes used in non-trivial 
expressions, so having a more meaningful
name can be helpful.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/20872#issuecomment-2342079640

Reply via email to