[Proposal]: [Infer Func/Action argument types] #4443
Unanswered
Alex2357
asked this question in
Language Ideas
Replies: 1 comment 5 replies
-
I think there are several issues with this suggestion:
|
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Type inference for Func/Action arguments and returned value
Add type inference for arguments in Func/Action declarations
I've coded using C# many years then for a while in F#, then in a new position in C#. Very frustrated with the fact that I have to write code similar to that one
Why I need to write this whole noisy thing
Func<string, MatchKind, string, PolicyConfiguration<RequiredReviewerPolicySettings>>
?I understand compiler wants to know if I'm declaring lambda or Func. Then I'd like to write something like
giving a hint to compiler that this is Func and the rest I'd like compiler to figure out the way F# does.
or something like below, not fast on syntax, the important moment is I do not wanna repeat argument types of a Func or Action I would like compiler to figure out them from usage same way as F# does.
Code clarity and less unnecessary noise
I wanna write less code and have less noise in my code. The more noise the more distractions and more bugs.
Beta Was this translation helpful? Give feedback.
All reactions