4 ms·
I think something like when a variable type in an enum was an interface it would destroy the galaxy or something, not 100% sure, would have to look it up... 1 s
by jurschreuder 2y ago
I think something like when a variable type in an enum was an interface it would destroy the galaxy or something, not 100% sure, would have to look it up... 1 sec.
Here you Go: https://go.dev/doc/faq#variant_types https://go.dev/doc/faq#variant_types
- lelanthran 2y 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.