News for hackers. Stuff that matters.
Re:Java 22 Released by grishka on Tuesday March 19, 2024 @01:10PM (#39757957)
They will eventually bring value types to Java with Project Valhalla.
Re:Java 22 Released by layer8 on Tuesday March 19, 2024 @01:49PM (#39758412)
I wonder how long it will take. We’ve been waiting for ten years already.
Re:Java 22 Released by ivan_gammel on Tuesday March 19, 2024 @03:32PM (#39759422)
Looks like we may see a first preview in Java 23, i.e. already this year.
Re:Java 22 Released by kaba0 on Tuesday March 19, 2024 @01:55PM (#39758477)
One design iteration already has a working, implemented branch available, it’s just one of the hardest designs to get right, to remain backwards compatible, to have it work nice with generics and all the other features, etc.

So once they actually settle on a design (which they seem to have closed on quite a lot in the last couple of years), it might not take that long to happen.

Re:Java 22 Released by soulbadguy on Tuesday March 19, 2024 @07:09PM (#39761271)
Noting that Valhalla value types are about guaranteeing object value identity with memory layout and/or flattening supposedly deriving from that. Modeling unmanaged sequence of bytes within the type system (like receiving a typed buffer from un managed code) might still be challenging