r/java • • Aug 25 '26

Value Classes Still Need Compiler Sympathy

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

65 comments sorted by

View all comments

Show parent comment

1

u/OwnBreakfast1114 Aug 26 '26

Why would I need to do that? You think I give a shit about object allocations while my db is being hit with unnecessary queries or I'm making multiple third party https calls?

The second I'm on a non-preview runtime, I'm throwing value on all my immutable classes (of which I have a lot) and I promise I won't care at all what C2 generates.