|
|
|
|
|
by motorest
478 days ago
|
|
Can anyone explain why enums are somehow bad but literal unions are supposed to be good? I'll be blunt: at the surface level, it looks like literal unions are something that only someone with an irrational axe to grind against enums would ever suggest as a preferable alternative just to not concede that enums are fine. If the problem lies in the low-level implementation details of enums, I cannot see any reason why they shouldn't be implemented the same way as literal unions. So can anyone offer any explanation on why enums should be considered bad but literal unions should be good? |
|