News for hackers. Stuff that matters.
Re:Java 20 Is Out! by nvarsj on Tuesday March 21, 2023 @01:34PM (#35249548)
It makes it very easy to deal with nested data structures. Imagine creating a nested map/struct literal, and then extract the values out using a very similar syntax on a single line.

It's one of those things that when you get used to, you wonder why other languages don't implement it.

Re:Java 20 Is Out! by Alifatisk on Tuesday March 21, 2023 @02:15PM (#35250177)
I think this answers the question very well, thank you. I found this [1] documentation from Ruby explain what it solves pretty good aswell.

[1] https://docs.ruby-lang.org/en/3.0/syntax/pattern_matching_rd...