New candidate JEP: 506: Scoped Values
Andrew Haley
aph-open at littlepinkcloud.com
Thu Apr 17 07:59:33 UTC 2025
On 16/04/2025 21:18, Adam Gent wrote:
> My apologies on bringing it up again so late.
>
> I did try in January:https://mail.openjdk.org/pipermail/loom-dev/2025-January/007411.html
>
> and I did not get much feedback (roughly ~3 months ago).
My apologies, too.
I had a look at the code in Subject.java, and tried a few things. It is
possible to use a null sentinel, but requires client code to do the
heavy lifting of working around a non-null restriction.
This would be a disincentive to using scoped values, would also be
the subject of may conversations, and would need more substantial
justification than I could sincerely provide. For me, the clincher
was Valhalla and Null-Restricted Class Types. Given such types, a
programmer will be able to declare non-nullable scoped values where
they are needed.
Andrew.
More information about the loom-dev
mailing list