-
Notifications
You must be signed in to change notification settings - Fork 227
Eliminate in-body declaring constructors #4562
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
Conversation
|
This PR deals with the comments from @lrhn on an earlier PR #4543, and it updates the primary constructor feature specification to eliminate everything associated with in-body declaring constructors. The terminology now uses 'primary' everywhere, because that's the only new kind of constructor which is being added by this feature. I did not change the experimental flag because that's a transient and relatively hidden thing. |
|
https://dart-review.googlesource.com/c/sdk/+/460420 updates the spec parser to use the new grammar rules, which serves as a sanity check on the grammar. |
accepted/future-releases/primary-constructors/feature-specification.md
Outdated
Show resolved
Hide resolved
accepted/future-releases/primary-constructors/feature-specification.md
Outdated
Show resolved
Hide resolved
accepted/future-releases/primary-constructors/feature-specification.md
Outdated
Show resolved
Hide resolved
accepted/future-releases/primary-constructors/feature-specification.md
Outdated
Show resolved
Hide resolved
accepted/future-releases/primary-constructors/feature-specification.md
Outdated
Show resolved
Hide resolved
| *For an extension type, this ensures that the name and type of the | ||
| representation variable is well-defined, and existing rules about final | ||
| instance variables ensure that every other non-redirecting generative | ||
| constructor will initialize the representation variable. Moreover, there |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(Are we sure there are such rules, and that they are not only defined for classes?)
accepted/future-releases/primary-constructors/feature-specification.md
Outdated
Show resolved
Hide resolved
accepted/future-releases/primary-constructors/feature-specification.md
Outdated
Show resolved
Hide resolved
accepted/future-releases/primary-constructors/feature-specification.md
Outdated
Show resolved
Hide resolved
accepted/future-releases/primary-constructors/feature-specification.md
Outdated
Show resolved
Hide resolved
munificent
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thank you for your endless patience dealing with the churn in this proposal. Our users will be better off for it.
This PR eliminates the support for in-body declaring constructors in the feature specification about declaring constructors. It also changes the terminology to use 'primary' rather than 'declaring' about the newly introduced constructors, because all other kinds have been eliminated.