-
Notifications
You must be signed in to change notification settings - Fork 213
Simplify augmentations. #4357
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
base: main
Are you sure you want to change the base?
Simplify augmentations. #4357
Conversation
- Remove references to macros. - Don't allow augmentations to wrap or replace code. Remove support for `augmented` expressions. Disallow an augmentation from providing a body to a declaration that already has one. - Remove support for augmenting variables. - Simplify constructor augmentations: no concatenating initializers or merging initializers from one augmentation and a body from another. - Remove support for augmenting typedefs. - Remove support for augmenting redirecting constructors. - Allow a function augmentation to have an `external` body. There are still more changes I'd like to make. In particular, the grammar for members seems pretty hairy and I suspect could be refactored to be simpler, but I'm not sure if that will cause problems for other people who rely on the existing grammar rules.
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.
More shorter, more better!
I have a gazillion nitpicks and some questions (which might suggest that something could be said to answer that question, or which might suggest that I only read the changed parts and therefore lacked some context.).
And some comments that are better left for later.
Good clean-up!
cc @johnniwinther @scheglov in case you have thoughts on how this would affect the implementation. |
augmented
expressions. Disallow an augmentation from providing a body to a declaration that already has one.external
body.There are still more changes I'd like to make. In particular, the grammar for members seems pretty hairy and I suspect could be refactored to be simpler, but I'm not sure if that will cause problems for other people who rely on the existing grammar rules.