-
Notifications
You must be signed in to change notification settings - Fork 12.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Consider making implicit any
the default for all generic type parameters
#13609
Comments
It's a really great improvement. |
@rbuckton interested in folding this into your current PR? We can also do it later instead |
I would keep this in a separate PR. |
@gcnew could you elaborate on that thought? |
My hunch is that defaulting parameters to an implicit value is not a good idea in general. I don't have anything specific, it was more like throwing in areas where potential issues may reside. Giving it a second thought, defaulting parameters to |
@gcnew I don't think that the implicit @RyanCavanaugh I just want to clarify the intent - is it all type parameters including those which have explicit defaults? |
If there's an explicit default, we would obviously use that instead of |
Sorry, I meant to ask about explicit constraints, not explicit defaults. |
Somehow decided we should do #10571 as part of this discussion |
Now that we have generic defaults (:tada:), we should consider making all type parameters have an implicit
any
default. An unspecified uninferred type parameter would have typeany
and trigger a warning undernoImplicitAny
.Benefits:
Drawbacks:
noImplicitAny
off but still want to enforce type parameters to be provided?The text was updated successfully, but these errors were encountered: