Re:Java's records, Lombok's data, and Kotlin's data classes
by balefrost on Friday May 07, 2021 @04:04PM
(#27080299)
The point of sealed classes is that you have a known number of possible representations. So you can have `when` blocks that exhaustively check all possibilities. Having an open class hierarchy would not work for that purpose.
[ Parent
| on HN ]