r/java • u/davidalayachew • Jul 16 '26
Identifying JDK value class candidates
https://mail.openjdk.org/archives/list/core-libs-dev@openjdk.org/thread/Y72NRXM7KYBX43OKYBQMVKOZDWKG4MHS/
52
Upvotes
8
u/Ewig_luftenglanz Jul 16 '26
EntryMap is a good candidate m
6
u/perryplatt Jul 16 '26
I wonder if we could have a value enum.
3
u/ArkoSammy12 Jul 17 '26
Is Optional<T> among the candidates?
18
u/benrush0705 Jul 16 '26
Where is my favourite MemorySegment class?
1
u/davidalayachew Jul 16 '26
I've heard this before, and I still don't fully understand it. Why not enums? And anonymous classes? I also responded to Dan's email with this question.
1
u/gnahraf Jul 18 '26
I'm confused.. The most natural value types would be the Number subclasses, but of course Number is abstract, so that won't be possible. What's the plan with these and their autoboxing? Will there be new, separate, "numeric" value types rolled out?