.NET (OK, C#) finally gets union types
20 points by ubernostrum
20 points by ubernostrum
Excited for this! Case inexhaustiveness only being a warning feels like a bit of a footgun though.
That's interesting, and I wonder what the reasoning was. With the OneOf package (mentioned in the article), it's an error as you'd expect.
Responses to some questions that compiler/PL people might have (disclaimer: not a C# expert, just skimmed https://github.com/dotnet/csharplang/blob/main/meetings%2Fworking-groups%2Fdiscriminated-unions%2Funion-proposals-overview.md + proposals linked from there)