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

Does Lambdas' introduction of ref and copy resolve the open question in values.md? #3859

Open
CJ-Johnson opened this issue Apr 4, 2024 · 2 comments
Labels
leads question A question for the leads team

Comments

@CJ-Johnson
Copy link
Contributor

Summary of issue:

/docs/design/values.md#value-representation-and-customization

Open question: The syntax for this is just placeholder, using a placeholder keyword. It isn't final at all and likely will need to change to read well.

Can const Self be replaced with const copy? Can const Self* be replaced with const ref?

See Lambdas proposal at #3848

Details:

No response

Any other information that you want to share?

No response

@CJ-Johnson CJ-Johnson added the leads question A question for the leads team label Apr 4, 2024
@justzh

This comment was marked as spam.

@geoffromer
Copy link
Contributor

It seems like it would be confusing if in this context const copy and const ref are self-contained expressions that refer to types, while in an implicit parameter list they are introducers or modifiers for a larger syntactic construct that refers to a variable (or a whole set of variables, in the case of the default capture mode).

It does seem like there's some commonality in the underlying semantics, but I'm not sure how to surface that in the syntax. When/if the design for function calls, extend adapt, etc. gets to a point where we can define reference types in terms of those concepts, I think we'll be in a much better position to sort this out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
leads question A question for the leads team
Projects
None yet
Development

No branches or pull requests

3 participants