# C# Language Design Meeting for October 1st, 2025

## Agenda

- [Closed enums](#closed-enums)
- [Closed Hierarchies](#closed-hierarchies)

## Quote of the Day

- "Have a good vacation Mads!"

## Discussion

### Closed enums

Champion issue: https://github.com/dotnet/csharplang/issues/9011  
Specification: https://github.com/dotnet/csharplang/blob/7603e3bee2ea3edb53e6a3b27efbaf24949b609f/proposals/closed-enums.md

First up today, we took another look at the current proposal for closed enums, to verify that after all of our related work on unions, we are still interested in this feature.
Ultimately, we are, but there are definitely some thorny questions to answer around just how strict we can or should make this. One example is in the BCL: do the various
`Enum` members need to behave differently in the face of a closed enum? What about exhaustiveness in switch statements; presumably we want it to handle not needing a `default`
case for returning, but how will that interact with `switch` statements that are intentionally not exhaustive, or in `void`-returning methods where there isn't a "you
forgot to return" error?

We do think that this is still an area we want to pursue, so we will keep working on these questions.

#### Conclusion

We will be pursuing closed enums.

### Closed Hierarchies

Champion issue: https://github.com/dotnet/csharplang/issues/9499  
Specification: https://github.com/dotnet/csharplang/blob/7603e3bee2ea3edb53e6a3b27efbaf24949b609f/proposals/closed-hierarchies.md

Next up, we did the same pass for closed hierarchies, making sure that we are still interested in this now that we have a better understanding of our goals for unions. Again,
we are still interested in the feature, and we want to pursue implementation. One question that we will need to answer is around performance; one major argument for having an
explicit list of allowed subtypes is for compiler performance, to ensure that we don't have to scan the entire compilation for potential subtypes. This is something that we
need to play with in real code to see what the performance is in reality, to ensure that we're not basing a language decision on pessimistic assumptions. There is still a
chance that we'll decide that we need the list for programmer convenience, but this is something that we think we need real feedback and usage on. There are various
options for how such a list could be constructed: we could use the same syntax as we have for `union`s, or we could force all declarations to live in the same file or have
partial parts in the same file. But we will start with no listing requirement and see what that looks like.

#### Conclusion

We will be moving forward with closed hierarchies.
