2 ms·
> I think something like when a variable type in an enum was an interface it would destroy the galaxy or something, Hah :-) > Here you Go: https://go.dev/doc/
by lelanthran 3y ago
> I think something like when a variable type in an enum was an interface it would destroy the galaxy or something,
Hah :-)
> Here you Go: https://go.dev/doc/faq#variant_types https://go.dev/doc/faq#variant_types
Not quite the same: Variants are a constrained list of types. Enums are a constrained list of values.
Let's assume that I agree with the reasoning for not having a constrained list of types.
It still doesn't tell me why we can't have a constrained list of values.