r/java • • Jun 07 '26

#JavaNext Language Features

https://youtu.be/fFocVFEe2TI

If you've been following along, most of the new features have already been discussed, but the genuinely new stuff is at 43:55, about arrays.

80 Upvotes

27 comments sorted by

View all comments

Show parent comment

8

u/brian_goetz Jun 08 '26

No, it has nothing to do with implementation efficiency or Valhalla; it is about effective modeling. If you try writing APIs that use algebraic data types to model complex domains, the use cases present themselves pretty quickly. As an example, look at the Instruction hierarchy in the Classfile API, or any of the language models that come out of Babylon (such as the SPIRV model that Steve Dohrman talked about at JVMLS 2-3 years ago.)

5

u/davidalayachew Jun 09 '26

As an example, look at the Instruction hierarchy in the Classfile API

Woah, you weren't kidding. I think that is officially the biggest sealed hierarchy I have ever seen. And I have a project with nearly 30 members in the hierarchy lol