3 ms·
There's also OneOf (https://github.com/mcintyre321/OneOf https://github.com/mcintyre321/OneOf) as well which feels more ergonomic to me (having used both). Pra
by CharlieDigital 2y ago
There's also OneOf (https://github.com/mcintyre321/OneOf https://github.com/mcintyre321/OneOf) as well which feels more ergonomic to me (having used both).
Practical example in a short write up here: https://chrlschn.dev/blog/2024/07/csharp-discriminated-unions-and-dotnet-channels/ https://chrlschn.dev/blog/2024/07/csharp-discriminated-union...
- zigzag312 2y agoIsn't OneOf more like a type union, and not a tagged/discriminated union?