# C# Language Design Meeting for January 13th, 2025

## Agenda

- [Discriminated Unions](#discriminated-unions)

## Quote of the Day

- "I'm apparently nothing"

## Discussion

### Discriminated Unions

Champion issue: https://github.com/dotnet/csharplang/issues/8928  
Proposal: https://github.com/dotnet/csharplang/blob/b6d1f4b3d132ce648299c75f3b9e2961151996b0/proposals/TypeUnions.md  
Working Group Status: https://github.com/dotnet/csharplang/blob/b6d1f4b3d132ce648299c75f3b9e2961151996b0/meetings/working-groups/discriminated-unions/Union%20implementation%20challenges.md

Today we heard from the discriminated unions working group, which has been hard at work exploring the various tradeoffs of how
different types of union structures can be implemented in C#. We started with a refresher of the various options, and worked in
explanations of the tradeoffs the group has discovered. On the whole, we agree with the conclusions of the group; there is some
difference in opinion on the severity of some of the pitfalls, such as the `OfType<Cat or Dog>()` issue in adhoc unions, but
we don't have any additional cases or examples to add to the group's conclusions. We are very much in favor of proceeding with a
single part of the proposal; while we want to keep the other parts in mind during design to ensure that we can add them at a later
date and have them still feel at home in the language, we view unions as a feature that we can and should deliver over time, rather
than all at once, much as we have done with patterns. Therefore, we will proceed with deep design work on just class unions for
now, drilling deep into just that section and working on a design that has the detail level necessary to be implemented in the
language. We want to make sure that, even if v1 of the feature doesn't have a story to grow from a simple union declaration to full
classes with the ability to declare members, implement interfaces, etc., that there is a plan for how to get that full
functionality in the future.

#### Conclusion

We will proceed with in-depth design work on class unions.
