Re:Java record pattern matching in JDK 19
by quilombodigital on Saturday May 14, 2022 @01:59PM
(#31380575)
This is the point, you dont consider the instanceof approach, is just wrong. You already know your types in advance.
This feature aims at the conciseness of first model (instanceof) with the safety of the second approach (i.e. all types are handled).
I would love this feature for my project! ( https://www.adama-platform.com ) since I use Java to implement a programming language.