Proposal for Multi-level Enums

As a reminder: initial draft for multi-level enums by esarbe · Pull Request #117 · scala/improvement-proposals · GitHub still needs some attention and love.

One open question is how ordinals are computed. Global ordinals feel a bit weird (see discussion and proposals) but at least they are unambiguous.

What do you think?

5 Likes

I looked through the draft, looks nice as far as I can tell. :+1:

Hope this gets implemented, it would really solve some of my design problems for which I’m currently resorting to union types (which are also very nice).

1 Like