.NET (OK, C#) finally gets union types
Microsoft's .NET 11 preview 2 introduces union types to C#, enabling developers to define a type that can be one of several named cases. This feature, long requested, allows for more expressive and safer code by eliminating the need for workarounds like discriminated unions via third-party libraries or complex inheritance hierarchies.
Union types reduce boilerplate and bugs by making impossible states unrepresentable.


