Microsoft has published their proposal for discriminated unions (DUs) in C#: Type Unions for C#.

This is just the first public step in a long line of steps necessary to add DUs, but I’m definitely looking forward to having DUs and exhaustive pattern matching (at least in the context of DUs) in C# someday.

Here are some discussions on the topic as well:


<
Previous Post
Difftastic
>
Next Post
C#: Safer Dictionary access in CCVTAC