2 ms·
The joke is, OO language have sum types, albeit incredibly broken ones, because any set of classes that inherits from the same base has the base as a sum type.
by moomin 6y ago
The joke is, OO language have sum types, albeit incredibly broken ones, because any set of classes that inherits from the same base has the base as a sum type.
You can surface this by implementing the visitor pattern.