It seems that now that Kotlin has sealed interfaces, it's preferable to use that than the coproduct datatype. Is that right? Are there any use-cases where coproduct would be the better choice?
julian
10/01/2021, 1:37 AM
Oh I thought of one - when you don't own the types you want to unify. Because you can't modify their definitions to add the sealed interface. In this case coproduct is not just the best choice, it's the only one.