I mean yes, but also: uh-oh. I'm looking forward to reading some code that is even more confusing than the code I'm already reading. Not entirely convinced that I see the usecase that makes up for the potential madness.
.NET (OK, C#) finally gets union types
11–20 of 300 posts
Re: .NET (OK, C#) finally gets union types
#12AFAICT, this means you won’t be able to define Either , which is definitely a thing you sometimes want to do.
Re: .NET (OK, C#) finally gets union types
#13I used to see some excitement around .net core several years ago. I haven’t heard or seen much in the wild. Is anyone using .net on systems other than windows nowadays?
Re: .NET (OK, C#) finally gets union types
#14AFAICT, this means you won’t be able to define Either , which is definitely a thing you sometimes want to do.
The idiomatic way to do this would be to parse, don't validate [1] each string into a relevant type with a record or record struct. If you just wanted to return two results of the same type, you'd wrap them in a named tuple or a record that represented the actual meaning.
[1] https://lexi-lambda.github.io/blog/2019/11/05/parse-don-t-va...
Re: .NET (OK, C#) finally gets union types
#15Earlier quoted context omitted.
Union/sum types are generally a good thing. Even Java added them. They tend to be worth “the madness”. Now the rest of all the crazy C# features might be a different question.
What features do you see as crazy?
Re: .NET (OK, C#) finally gets union types
#16AFAICT, this means you won’t be able to define Either , which is definitely a thing you sometimes want to do.
public record Left(T Value);
public record Right(T Value);
public union Either(Left, Right);Re: .NET (OK, C#) finally gets union types
#17I used to see some excitement around .net core several years ago. I haven’t heard or seen much in the wild. Is anyone using .net on systems other than windows nowadays?
Re: .NET (OK, C#) finally gets union types
#18I mean yes, but also: uh-oh. I'm looking forward to reading some code that is even more confusing than the code I'm already reading. Not entirely convinced that I see the usecase that makes up for the potential madness.
Re: .NET (OK, C#) finally gets union types
#19I mean yes, but also: uh-oh. I'm looking forward to reading some code that is even more confusing than the code I'm already reading. Not entirely convinced that I see the usecase that makes up for the potential madness.
Re: .NET (OK, C#) finally gets union types
#20I used to see some excitement around .net core several years ago. I haven’t heard or seen much in the wild. Is anyone using .net on systems other than windows nowadays?
It’s huge in the game dev world, with Unity and Godot. .net also had a reasonable community on mobile for a while thanks to Xamarin, but I cannot imagine that many people using it for new mobile projects in 2026 (outside of game dev I mean). It’s a very decent language (I mean C#) and runtime, I wish it had more market share in the startup world.