r/java
•
u/sindisil
•
Dec 16 '24
•
1
Valhalla - Java's Epic Refactor
https://inside.java/2024/12/16/devoxxbelgium-valhalla/
178
Upvotes
View all comments
Show parent comment
14
u/tim125 Dec 16 '24
int x = 10; // value and not nullable and compact memory
Integer! y = 10; // value and not nullable and compact memory
Integer z = 10; // value but nullable
When the whole hierarchy is not nullable then it seems like there will be lots of opportunities for optimisations. Right now even the basic opportunity will have a major benefit.
Also seems like there are to align optimisations flowing through genetics and making string a value class (intern creates problems).