Re:The Grug Brained Developer (2022)
by PaulHoule on Tuesday June 17, 2025 @09:56PM
(#44305973)
Currently Java supports records (finalized in JDK 16) and sealed classes (JDK 17) which together work as algebraic data types; pattern matching in switch was finalized in JDK 21. The syntax is pretty sweet
https://blog.scottlogic.com/2025/01/20/algebraic-data-types-...