RFR: 8354954: Typed static memory for late initialization of static class members in Hotspot [v9]
Kim Barrett
kbarrett at openjdk.org
Mon Apr 28 17:38:49 UTC 2025
On Mon, 28 Apr 2025 17:33:07 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:
>> Johan Sjölen has updated the pull request incrementally with one additional commit since the last revision:
>>
>> More documentation, rename ptr to get
>
> Changes requested by kbarrett (Reviewer).
> @kimbarrett,
>
> I've applied all of your comments, except the `get()` rename. To me, both `ptr` and `get` is fine. We can take the rename just to make it more obviously pronuncable.
Looks like the rename to `get()` happened after all?
> We need a better name than `StableValue<T>`. We could call it `Deferred<T>`, or `DeferredInitialization<T>`. I think that `Deferred<T>` is better, it's a bit shorter while conveying _some_ meaning. You can very easily jump2def to see what it says in the docs, and then probably remember it.
`Deferred<T>` seems fine to me.
> Regarding tooling: I use `clangd` as my LSP server, so clang provides my IDE capabilities. It has no problem with figuring out the T and using it after a `get()` or `->`.
I'm not sure what this is in response to? Maybe to a comment from someone else?
-------------
PR Comment: https://git.openjdk.org/jdk/pull/24689#issuecomment-2835996047
More information about the hotspot-dev
mailing list