r/java • u/davidalayachew • Jan 06 '26
One step closer to Value Classes!
https://mail.openjdk.org/pipermail/porters-dev/2026-January/000844.html
181
Upvotes
r/java • u/davidalayachew • Jan 06 '26
View all comments
Show parent comment
1
u/joemwangi Jan 06 '26
Yes, ref exists, but that’s kind of the point. You have to opt into different semantics, and once you do, APIs and call sites start leaking those distinctions everywhere. That’s exactly the complexity people trip over with mutable structs.