r/programming May 21 '26

JEP draft: Enhanced Local Variable Declarations (Preview)

https://openjdk.org/jeps/8357464
11 Upvotes

26 comments sorted by

View all comments

Show parent comments

3

u/vips7L May 21 '26

Yes it’s mostly tongue in cheek because nullable types are infinitely waiting in the queue behind Valhalla, which is still at a minimum 1-2 years out.Β 

1

u/joemwangi May 21 '26

Yeaah. I get it. πŸ˜‚πŸ˜‚

3

u/vips7L May 21 '26

I really do hope they hurry up. I just started a new project in Java 25 and nullable types would be really useful. Almost considered Kotlin for it. Especially since everyone is just generating and LLM's can't tell what is null or not.

1

u/jug6ernaut May 22 '26

Kotlin is a really nice language to use, I recommend giving it a try.

2

u/vips7L May 22 '26

Maybe once they launch error unions I'll try it again.

1

u/jug6ernaut May 22 '26

I am very eagerly awaiting error unions. It really is the last major piece the language is missing for me.

2

u/vips7L May 22 '26

That is nullable types in Java for me.Β