3 ms·
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 fi
by PaulHoule 1y ago
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-with-java.html https://blog.scottlogic.com/2025/01/20/algebraic-data-types-...
- tayo42 1y agooh thats cool. thanks for sharing!