▲ | debugnik 3 days ago | |
> so a number of pattern can all be called "discriminated unions" Assuming they've got discriminators and some sense of type union, sure. > I just showed a data model with a discriminator (.Type) Which won't let you recover the additional fields from a pointer because you can't downcast, so that's insufficient for a union. AFAIK you need to combine this with interfaces, which I already know how to do. > These are largely irrelevant in a discussion about type embedding. Don't tell me, you brought it up. | ||
▲ | oefrha 3 days ago | parent [-] | |
It’s almost like I brought it up in passing because it’s a somewhat relevant concrete use case, rather than brought it up to have people who “already know how to do” to chastise me for not writing a full treatise on the use case. |