Skip to content
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

Terminology: qualified member access expression #1142

Merged
merged 1 commit into from
Mar 17, 2022
Merged

Terminology: qualified member access expression #1142

merged 1 commit into from
Mar 17, 2022

Conversation

josh11b
Copy link
Contributor

@josh11b josh11b commented Mar 17, 2022

This is a follow up to #1138 , and in particular this review comment.

@josh11b josh11b requested review from a team as code owners March 17, 2022 17:42
@josh11b josh11b requested a review from zygoloid March 17, 2022 17:44
the member.
resolved in the containing scope. A compound member access where the member
expression is a simple member access expression, as in `a.(context.b)`, is
called a _qualified member access expression_. The member expression `context.b`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you think it'd be useful to define this more centrally (perhaps in docs/design/expressions/member_access.md) rather than in generics terminology? I think we'd expect most uses of this functionality to be generics-related, but this syntax would probably also be useful for example when accessing a shadowed member from a base class.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm fine either way. My inclination is to wait until we have another use case, since I don't think we have decided whether a derived class can shadow members of its base.

Copy link
Contributor

@zygoloid zygoloid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good; while I think we might want to centralize the new term, that can wait until we have uses of it outside generics.

@josh11b josh11b merged commit 4f5cc90 into carbon-language:trunk Mar 17, 2022
@josh11b josh11b deleted the qualified branch March 17, 2022 21:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants