4 ms·
Discriminated Unions will make working with Result<T,TErr> easier as would provide exhaustive checking. DUs are being designed: https://github.com/dotnet/csharp
by jve 3y ago
Discriminated Unions will make working with Result<T,TErr> easier as would provide exhaustive checking. DUs are being designed: https://github.com/dotnet/csharplang/issues/113 https://github.com/dotnet/csharplang/issues/113
- alkonaut 3y agoFantastic. I note it's indeed being designed since 2017 so it's probably not as easy as I would hope. The design seems to not have progressed beyond discussion at all in 6 years.
- conor- 3y agoUntil that feature lands there's this https://github.com/mcintyre321/OneOf https://github.com/mcintyre321/OneOf which is pretty nice.
- Turskarama 3y agoI suspect a lot of the pattern matching stuff was built in order to support these. Sum types are a feature I'm really excited for.