re: Action-Oriented C# VIEW POST

TOP OF THREAD FULL DISCUSSION
re: I agree with the syntax issues. TypeScript has type aliases where you can name a union of types for example. .NET cod use something similar. That...
 

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).

code of conduct - report abuse