C# has indeed finally gained sum types this year… in preview. We’ll see if anything makes it into C#15 but they’re closer than they’ve ever been.
Type unions only at first, but there's more being planned.
Type unions only at first, but there's more being planned.