2 ms·
Java supports sealed classes (which is close enough to sum types at least for the stuff I work on), and pattern matching over them is in preview. https://openj
by 5e92cb50239222b 4y ago
Java supports sealed classes (which is close enough to sum types at least for the stuff I work on), and pattern matching over them is in preview.
https://openjdk.org/jeps/409 https://openjdk.org/jeps/409
https://openjdk.org/jeps/427 https://openjdk.org/jeps/427
- kaba0 4y agoThey are literally sum types, with records being the corresponding product types.