Yah, definitely didn't want it to seem like I dislike them or avoid them.
I tend to use them for internal APIs and infrastructure code - less so for business logic service methods.
I just saw on Twitter today that someone is actively championing discriminated unions for C# 9 😁:
Andy Gocke @andygocke @isaac_abraham @vkornov @jaredpar @eric_sink @k_cieslak @shanselman @terrajobst Discriminated unions, with completeness checking, are championed by me and scheduled for C# 9 18:30 PM - 15 Sep 2019 17 72
Both TypeScript's and F#'s allowance of not explicitly typing params and return types helps reduce that function + generic noise.
We could do the aliasing with C# named delegates, but then we are kinda just trading one noise for another (with more type limitations).
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Yah, definitely didn't want it to seem like I dislike them or avoid them.
I tend to use them for internal APIs and infrastructure code - less so for business logic service methods.
I just saw on Twitter today that someone is actively championing discriminated unions for C# 9 😁:
Both TypeScript's and F#'s allowance of not explicitly typing params and return types helps reduce that function + generic noise.
We could do the aliasing with C# named delegates, but then we are kinda just trading one noise for another (with more type limitations).