Multiple Types

Fine, I see the recursiveness. So the question about “recursive enums” should be clarified, thanks.

But enums would only be a choice if they could be used as described in the above comment by @tera. I already said above, sum/union types for me is something like enums, but with a nicer syntax (see the same comment by @tera).

In conclusion, I see strong arguments for (recursive) sum/union types with the nice “|” syntax, I have the strong feeling that things like the buildExpression functions for state builders discussed above or enums where all cases have accociated values are a unsatisfactory replacement for a tool that seems very natural (and is part of other languages), and concerning questions of efficiency, my naïve suspicion is, if enums are efficient than why should union types be less efficient.