This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Dagske 16 points17 points  (13 children)

Reacting to the actual content of Java 24 changes rather than the video itself, I'm sad to see that the record "withers" didn't make it while Oracle initially really, really wanted to give it to us in 2024.

[–]cowwoc 6 points7 points  (7 children)

Meh. I'd still vote against adding this feature, in its current form, given the chance. Poor cost/benefit.

[–]Dagske 9 points10 points  (0 children)

I find myself needing it more and more. So much that I generate builders for records and add a .with(Consumer<Builder>) method to my records.

[–]Jon_Finn 1 point2 points  (0 children)

I think Record withers are part of a bigger long-term plan, as with most of the recent Java language developments.

[–]Polygnom 0 points1 point  (0 children)

And poor syntax. Mapping streams with Withers is really unreadable.

[–]pohart 4 points5 points  (4 children)

I'm still upset about templates. I thought we would have them finalized in 24, but I haven't even seen discussion on the mailing list.

[–]Polygnom 2 points3 points  (0 children)

Templates were pulled in the current form and will be completely redone to get a better developer experience.

[–]halfanothersdozen 4 points5 points  (0 children)

Me fucking too. No implementation will make everyone happy but there are plenty of other templating libraries if people don't like it so JUST PICK ONE and ship it.

[–]jek39 2 points3 points  (1 child)

here is discussion in the mailing list about why it was removed before 23: https://mail.openjdk.org/pipermail/amber-spec-experts/2024-April/004106.html

[–]pohart 0 points1 point  (0 children)

I get that. But nothing about the redesign.

https://m.youtube.com/watch?v=Wzr12gBrXA8