Re:Fourteen Years of Go
by kaashif on Saturday November 11, 2023 @11:51AM
(#38231938)
Java actually does have pattern matching like this:
But it only got that recently.
[ Parent
| on HN ]
And further improvements are expected.
Wishing that eco system the best then! ADTs and pattern matching are the best thing since sliced bread.
Sometimes I wonder: will they become table stakes in the future, or will we wake up to their (currently unknown) downsides in a decade or two? Think of how exceptions are now considered a poor pattern, compared to errors as values.