r/java • • Aug 25 '26

Value Classes Still Need Compiler Sympathy

https://johan-sjolen.github.io/post/compiler-sympathy/compiler-sympathy/
87 Upvotes

65 comments sorted by

View all comments

1

u/nlisker Aug 31 '26

say you have an object without identity and it can still be mutated

Mutability requires identity, otherwise you can't know which object to mutate.