Proposal: Implicit Generic Type Arguments #4781
Unanswered
ChristopherHaas
asked this question in
Language Ideas
Replies: 1 comment
-
#339? |
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
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
The motivation for the feature is about reducing type parameters for types using nested generic types.
Suppose we have a type like this:
The declaration of TITem in the type definition seems redundant, and this can cause some very long and complicated type names in more elaborate examples.
It would be awesome if the TItem did not need to be declared in type name but instead could be implicitly inferred from the constraint on TCollection. I.e., we could have something like:
Beta Was this translation helpful? Give feedback.
All reactions