StableValue vs Optional
Mickael Istria
mistria at redhat.com
Tue Jun 17 15:01:06 UTC 2025
On Tue, Jun 17, 2025 at 4:51 PM Maurizio Cimadamore <
maurizio.cimadamore at oracle.com> wrote:
> Maybe I'm misunderstanding... what would be the difference between
> StableValue::supplier and Supplier::cache ?
>
> Is it a discoverability issue you are pointing out (e.g. this factory
> would be more discoverable if it belonged to Supplier -- which is something
> we flipped-flopped several times about) or is there more, e.g. a semantics
> distinction?
>
It's me who misunderstood: I misread StableValue::supplier signature and
had thought it would return a StableValue. And that is wrong, it does
indeed return a Supplier, my bad!
So I suspect the issue I faced is more an issue of discoverability or
consistency with existing APIs then: if I want a Supplier, the first thing
I'd try is to use my IDE to complete Supplier.| , I don't think I would
easily think of completng StableValue.| to get a Supplier.
>
--
Mickael Istria
Eclipse IDE <https://www.eclipse.org/eclipseide> developer, for Red Hat
<https://developers.redhat.com/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/core-libs-dev/attachments/20250617/c1fe03ab/attachment.htm>
More information about the core-libs-dev
mailing list