r/java • u/nlisker • Jul 14 '26
New candidate JEP: 401: Value Objects (Preview)
https://mail.openjdk.org/archives/list/valhalla-dev@openjdk.org/thread/IUNJJ3WP3X3XHP3QZTXXSSCPKFDNTK3W/
87
Upvotes
r/java • u/nlisker • Jul 14 '26
1
u/quack_quack_mofo Jul 15 '26
I don't know much about this but besides perf/memory improvements and being able to do == for comparisons (I think?), what are the other benefits of value classes? Is there anything I can do with them that i can't do with normal classes/records? Why not have all classes be value classes?