|
|
|
|
|
by nine_k
314 days ago
|
|
I think that using embedding for discriminating unions if a good idea. It would work, but it does not force the user to do the discrimination. I would say that explicit typecasting at the point of discrimination is safer. Without it, nothing prevents you from using one field from one variant of the union, and another from a different variant. Introduction of proper discriminated unions would be great. |
|
You seem to be under the impression that I'm advocating for something like
That's what I consider going crazy.