-
Notifications
You must be signed in to change notification settings - Fork 48
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
From MCP 77: Charter for Deref Patterns Project Group #78
Conversation
Could you please inline a brief discussion of the exhaustiveness issue directly in the charter, rather than having it only in a linked document? The full details (including potential solutions) can still be off in the linked document, but the charter should clearly state the problems or potential problems. |
Thanks for writing this up. I'm feeling torn. I think that this is an important ergonomic win -- it's a small, frustrating scenario. On the other hand, I'm a bit concerned because I'm not sure if want to tackle the question of This seems to be the key question for us:
|
Co-authored-by: Josh Triplett <josh@joshtriplett.org>
Thank you for the feedback. |
Thanks for the updates! We had a long discussion (https://youtu.be/KNemhVm8kgA?t=35) about this in this week's lang team meeting (https://github.com/rust-lang/lang-team/blob/master/minutes/2021-02-09.md#mcp-deref-patterns-lang-team77). There's some concern about how big a rabbit hole this might be opening with all the possible implications and tendrils. We'd like, before chartering this to know what it would mean to do this without |
So, DerefPure is one of the three possible solutions that were considered prior to the charter. It is the one that would allow for exhaustive matching with deref patterns for user-defined types. If it is not being pursued at this time, then that leaves either not having exhaustive deref patterns, or restricting deref patterns to standard library types or a subset thereof (or a possible combination of the two). |
@chorman0773 that sounds right -- the question I guess is whether you have interest in pursuing the parts of this that don't involve |
I do not see an issue pursuing it for only standard library types at this time, as long as there is intent to expand it beyond there in the future. Ideally, in my opinion, it would extend further than just Box, but the exact subset is a question to be answered by the project (possibly consulting with T-libs). |
We discussed this in the lang team meeting yesterday, and our consensus from the meeting was:
@chorman0773 how does that sound to you? |
That seems reasonable. |
I've updated the charter to reflect that deref patterns for user-defined types are not being persued in this initial project. |
@chorman0773 the project group would be writing up a plan for what the criteria are and some types that meet it. But going forward, new types will be added, so the criteria would be needed to decide if they too should support it. (And of course, the final decision is made by lang/libs in the form of an RFC.) |
Alright, thank you. I've reworded it to reflect that. |
From MCP #77.
This proposes the charter for the Deref Patterns Project Group.