-
Notifications
You must be signed in to change notification settings - Fork 205
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
remove the requirement for required
on nnbd arguments
#2050
Comments
We had a discussion about this a while ago in #878. Unfortunately, it was closed, but this makes complete sense. |
This has been very extensively discussed, both in #878 and in the original design issue thread #156 (see this comment for pointers to some of the most relevant bits). I'm going to close this out, unless there's something new to discuss here (in which case it might be better to tack it on to #878 where there's already context. |
Looks like it's been well discussed. I've not got anything new to add.
S. Brett Sutton
Noojee Contact Solutions
03 8320 8100
…On Thu, 6 Jan 2022 at 10:26, Leaf Petersen ***@***.***> wrote:
This has been very extensively discussed, both in #878
<#878> and in the original
design issue thread #156
<#156> (see this comment
<#878 (comment)>
for pointers to some of the most relevant bits). I'm going to close this
out, unless there's something new to discuss here (in which case it might
be better to tack it on to #878
<#878> where there's already
context.
—
Reply to this email directly, view it on GitHub
<#2050 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAG32OHVDRZRRGUZMGVJUM3UUTHRFANCNFSM5LK5J45A>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
When defining a named argument with a non-nullable type and no default you are required to add the
required
keyword.This appears to be redundant.
From the diagnostics page:
I've identified five use patterns for named arguments:
The option for required with pattern five makes sense, the requirement on one appears to be redundant.
Given most of my usage of named arguments is for non-nullable types this redundant requirement is somewhat annoying.
It would appear that we could remove this requirement and provide a lint to advise that it can be removed.
I don't think this would require any migration as it simply becomes optional.
The text was updated successfully, but these errors were encountered: