Discriminated unions coming to C# (type unions) #1347
StefanBertels
started this conversation in
General
Replies: 1 comment
-
If they add Option to System then I'll remove it from lang-ext and then extend it to have the same interface. The biggest issue will be inability to use the traits. Although, I'm hoping that the new extension-types feature (which will come before sum-types) will enable ad-hoc traits. If that's the case then the transition should be quite smooth. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Seems that after a long discussion DU might arrive in C#:
https://github.com/dotnet/csharplang/blob/main/proposals/TypeUnions.md
They want to introduce
Option
andResult
(~Either/Fin). But: "no monadic behaviour" (for now). Hmm.Could/Should lang-ext make use of those types union feature? Naming conflicts?
What do you think?
Beta Was this translation helpful? Give feedback.
All reactions