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

Design meeting: Deref Patterns #260

Closed
Nadrieril opened this issue Apr 1, 2024 · 0 comments
Closed

Design meeting: Deref Patterns #260

Nadrieril opened this issue Apr 1, 2024 · 0 comments
Labels
meeting-proposal Proposal for a lang team design meeting T-lang

Comments

@Nadrieril
Copy link
Member

Summary

We would like to be able to match through the smart pointers of the standard library ergonomically:

let x: Option<Rc<bool>> = ...;
match x {
    Some(deref true) => ...,
    Some(x) => ...,
    None => ...,
}

There are a few design questions around this, most importantly syntax-wise. I prepared a design document with two specific proposals; I would like to discuss them.

Concrete questions I would like answered:

  • Is one of these proposals something we would like to do? Any objections or unexplored possibilities?
  • Should we reserve the deref keyword for edition 2024?

Background reading

About this issue

This issue corresponds to a lang-team design meeting proposal. It corresponds to a possible topic of discussion that may be scheduled for deeper discussion during one of our design meetings.

@Nadrieril Nadrieril added meeting-proposal Proposal for a lang team design meeting T-lang labels Apr 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
meeting-proposal Proposal for a lang team design meeting T-lang
Projects
Development

No branches or pull requests

2 participants