4 ms·
a lot of the really functional stuff has happened from 17 onwards (though probably present as preview features since 17 perhaps?) e.g. sealed classes are effec
by tpoacher 2y ago
a lot of the really functional stuff has happened from 17 onwards (though probably present as preview features since 17 perhaps?)
e.g. sealed classes are effectively sum types for java; records are effectively product types, and switch expressions now can do pattern matching at the record field level, with added guards. streams give you a mechanism for tail recursion with tail-call optimisation, etc. there's a nice little section on dev.java "moving to functional" (or something like that).