I’m not immersed enough into the debate to have a qualified opinion. So just because i’m interested: is there anything that anonymous enum can do that cannot be done with a set of stdlib types like
enum Either<A, B> { A(A), B(B) }
enum Either3<A, B, C> {A(A), B(B), C(C)}
enum Either4<A, B, C, D> {A(A), B(B), C(C), D(D)}
...
, beside being not as ugly?
(I’m following the haskell naming, i’d prefer OneOf instead of Either)
Maybe it could even play together with variadic generics, once that lands…