Closed iluuu1994 closed 3 years ago
What use would an empty enum have? I can't think of one. A single-element Enum would be a category theory "unit" (a type with only one value, and thus adds no value to a product type), but I don't know what purpose a 0-element Enum has.
Nothing really. What's an empty if statement useful for? Nothing really. We allow it anyway :)
I don't feel strongly enough about it either way, so whatever gets it the most votes works for me.
I think it would be more consistent. We allow empty classes, functions, if statements, switch statements, match expressions, etc.
Changed the RFC.
Thanks!
The RFC currently says:
Any reason for requiring at least one case? All other language constructs allow empty bodies.