RFR: 8247755: Leaner and more versatile GrowableArray classes
Kim Barrett
kim.barrett at oracle.com
Fri Jun 19 03:36:44 UTC 2020
> On Jun 18, 2020, at 5:20 PM, Stefan Karlsson <stefan.karlsson at oracle.com> wrote:
> On 2020-06-18 21:39, coleen.phillimore at oracle.com wrote:
>> So all the functions in this class need to be able to call grow(), with allocator 'S' right?
>
> Yes.
>
>> Can template parameter 'S' be "ALLOC" so it's easy to find?
>
> I chose the name S to match that the class that S represents *must* be a subclass. I can rename it to ALLOC, but then the name would loose that connection. I'd like to here more opinions before changing this.
“S” doesn’t say a whole lot.
A convention I’ve seen is to name such a CRTP template parameter “Derived”.
Though I’m not sure CRTP is the way to go here; I’m still working on reviewing though, so
possibly more on that later.
More information about the hotspot-dev
mailing list