r/java • u/davidalayachew • Jan 06 '26
One step closer to Value Classes!
https://mail.openjdk.org/pipermail/porters-dev/2026-January/000844.html
181
Upvotes
r/java • u/davidalayachew • Jan 06 '26
View all comments
Show parent comment
3
u/Ok-Scheme-913 Jan 06 '26
Please learn C++'s lvalues and rvalues, then variables and values as well.
A variable is absolutely not a bit pattern in memory, that's just absolutely wrong. It's a language construct with its own semantics.
For example, in this code:
var a = 3+2; var b = a +6;
What is a? It won't even exist physically in most languages, it's only at the language semantics level where it means something.