# C# Language Design Meeting for March 28th, 2024

## Agenda

- [Discriminated Unions](#discriminated-unions)

## Quote of the Day

- "I think [redacted LDT member] is a decent person... oh wait, did you turn the mic back on?"
- `public sealed enum Planets { Earth, Jupiter, Mars, Mercury, Neptune, Pluto, Saturn, Uranus, Venus }`

## Discussion

### Discriminated Unions

https://github.com/dotnet/csharplang/issues/113

Today, we took a look at the areas the discriminated unions working group has been investigating. A significant portion of the meeting was going over slides,
which have been included [here](./LDM-2024-03-27-presentation.pdf). These slides have been helpfully annotated with speaking notes, so this set of notes won't
go deep into the points covered in the presentation itself.

We had a few reads of the room during the meeting, particularly at the end, to try and help focus on the next direction for the working group to move. One clear
result from these reads was that we need to support existing "closed" type hierarchies in some fashion, even if it's just in exhaustiveness in pattern matching.
This already has a [championed issue](https://github.com/dotnet/csharplang/issues/485), and we don't think that we necessarily need to tie it to DUs specifically,
but that we should understand how the broader DU feature will behave so that we can integrate these existing hierarchies into that feature set, rather than having
multiple sets of behaviors depending on how such a hierarchy was defined.  
We were also unable to clearly come to a decision around implementation strategies after this meeting; we have a much better understanding now of the tradeoffs
that various strategies will have, both from a performance perspective, and from a versioning perspective, but we still need to narrow the scenarios we're trying
to address further before we can determine what weights to put on those tradeoffs.
