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

Delegation of implementation (RFC 1406) #1

Open
elahn opened this Issue Jul 30, 2017 · 4 comments

Comments

Projects
None yet
2 participants
@elahn
Copy link
Owner

elahn commented Jul 30, 2017

This issue is to discuss the refactoring of RFC 1406.

Goals:

  • address concerns raised in the comments
  • provide examples and quote relevant discussion, highlighting unresolved concerns
  • provide example syntaxes for each aspect of the design, including concerns raised, to facilitate discussion and consensus on the ideal syntax
  • separate aspects of the RFC so they can be easily understood and evaluated

I'm happy to grant push access to this repo to everyone participating, so we can collaborate and iterate on this refactoring, please comment below.

If you'd like to discuss your changes before pushing or have them reviewed, please send a PR and tag people.

Once the RFC document is ready, I'll send a PR to the original RFC, so it can be reviewed and accepted. The impl period starts Sep 18, so allowing time for the lang. team to review + FCP, we only have 3 weeks to get this RFC ready, if we want it implemented this year or early next year.

Published RFC: rendered, comment thread
Latest version: rendered
Git branch: delegation

@contactomorph

This comment has been minimized.

Copy link
Collaborator

contactomorph commented Aug 3, 2017

Hi @elahn

Thank you for trying to improve my RFC. Just a few comments:

  • I think you should focus on a particular syntax when explaining general concepts and behaviours and only propose a list of possible syntax in a second time (For example the paragraph that starts with "Let's compare this with inheritance" does not only concerns syntax 1)
  • Syntax 3 has an unexpected form in "Delegate a trait impl to a struct field". I would have rather imagined:
impl<'a> H<'a> for Hash {
    delegate to self.name; // or delegate * to self.name;
}
  • Paragraph title "Delegating to arbitrary expressions (formerly partial delegation)" is misleading. What I called "partial delegation" is what you've called "method delegation": the fact that one does not want to delegate the entire trait (what could be called "complete delegation") but needs to specify which method must be automatically delegated. This is not related to the nature of the delegating tool (field or more general expression)
@elahn

This comment has been minimized.

Copy link
Owner Author

elahn commented Aug 6, 2017

Hi @contactomorph, thanks for the feedback. I've pushed an update reorganising for the new RFC format, with Guide-level and Reference-level explanations. And moved alternative syntax examples to the end.

Yeah, I think that was the syntax I proposed. I did a first pass expanding the summary list @cramertj posted, without thinking too much. I'm very much in favour of "write first, evaluate and refine later" as it makes me more productive. I'll definitely add that syntax alternative.

You're right about that section, but it's mixed with syntax showing delegation to arbitrary expressions, which I would like to separate out and clearly delineate. Renaming the section was an easy way to note to myself "this is what I want to keep from this section when refactoring it."

I encourage everyone interested to edit and push updates to this branch, so we can iterate as fast as possible.

@elahn

This comment has been minimized.

Copy link
Owner Author

elahn commented Aug 8, 2017

Task list, feel free to edit and add tasks/mark completed.

  • As an issue comment, list concerns/objections raised in the RFC thread.
  • Tick off the concerns/objections which are handled in the RFC document.
  • Look through the RFC thread for syntax discussion and add to the end of the RFC document:
    • Suggested syntaxes
    • Objections/concerns raised for each syntax
@elahn

This comment has been minimized.

Copy link
Owner Author

elahn commented Mar 30, 2018

elahn pushed a commit that referenced this issue Apr 1, 2018

elahn pushed a commit that referenced this issue Apr 1, 2018

Merge pull request #1 from Centril/patch-const-repeat-1
rfc, const-repeat-expr: notes on is_rvalue_promotable(expr)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.