r/programming • • Sep 15 '20

Java 15 released!

https://jdk.java.net/15/
214 Upvotes

130 comments sorted by

View all comments

44

u/BoyRobot777 Sep 15 '20 edited Sep 15 '20

12

u/BoyRobot777 Sep 15 '20

Also, records with withers will be quite nice.

1

u/DoListening2 Sep 15 '20 edited Sep 15 '20

Reminds me a bit of immer https://immerjs.github.io/immer/docs/introduction from the JS world, which is pretty nice to use in practice.

Although this doesn't seem to address deep/nested updates in any way (those aren't nearly as important though), so I guess it's more akin to the JS pattern of doing

const newObject = { ...oldObject, field: value, field2: value2 }

in that sense.