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
View all comments
Show parent comment
2
u/koflerdavid Jul 14 '26
Another thing you can do is creating wrapper classes for type-safe identifiers instead of passing around anonymous
String,UUID,longetc. throughout the codebase. Kotlin already optimizes this important special case.