Benedikt Ritter on Nostr: Java will be getting value classes https://openjdk.org/jeps/8277163 in short it’s ...
Java will be getting value classes
https://openjdk.org/jeps/8277163 in short it’s classes where instances don‘t have a unique identity. In other words == and equals() will behave the same way. It took me so long to understand the difference for traditional classes. In wonder whether this will make things more confusing because now you need to look up a class definition when you see == somewhere. Also records can be value classes…
#java #jep #confused #oop #objectorientedprogramming
Published at
2023-07-28 08:45:41Event JSON
{
"id": "3c4ff44c5e51ba196b9529bd750ad9427fce1208385fab2360578a33583928ee",
"pubkey": "130e9dae1e1eb37d21d7eccfad14cec63a06814bfab710ec8d3d33cbdfcd7786",
"created_at": 1690533941,
"kind": 1,
"tags": [
[
"t",
"java"
],
[
"t",
"jep"
],
[
"t",
"confused"
],
[
"t",
"oop"
],
[
"t",
"objectorientedprogramming"
],
[
"mostr",
"https://chaos.social/users/britter/statuses/110790832362596925"
]
],
"content": "Java will be getting value classes https://openjdk.org/jeps/8277163 in short it’s classes where instances don‘t have a unique identity. In other words == and equals() will behave the same way. It took me so long to understand the difference for traditional classes. In wonder whether this will make things more confusing because now you need to look up a class definition when you see == somewhere. Also records can be value classes…\n#java #jep #confused #oop #objectorientedprogramming",
"sig": "5fc96545f3b62f6a5397f9076c739cc48c673c5ba511e894be17a88b8d7c202ab0631105e2e2e6bf9d08aaedc5238b49cd2737fa49c2ed458e76e9a2be4b4d50"
}