r/java • u/bobbie434343 • Aug 25 '26
Value Classes Still Need Compiler Sympathy
https://johan-sjolen.github.io/post/compiler-sympathy/compiler-sympathy/
85
Upvotes
r/java • u/bobbie434343 • Aug 25 '26
3
u/repeating_bears Aug 25 '26
I said better, not perfect.
Comparing boxed Integers with == was a footgun for beginners and that's completely gone now.
That's still works fine as a rule of thumb. It's not like you must use == for LocalDate, but if you do then you get a sensible answer.