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

Consensus check: let-chains and is are not mutually exclusive #297

Open
joshtriplett opened this issue Nov 9, 2024 · 7 comments
Open

Consensus check: let-chains and is are not mutually exclusive #297

joshtriplett opened this issue Nov 9, 2024 · 7 comments
Labels
disposition-merge The FCP starter wants to merge (accept) this finished-final-comment-period T-lang to-announce Not yet announced MCP proposals

Comments

@joshtriplett
Copy link
Member

joshtriplett commented Nov 9, 2024

In a recent lang design planning meeting, we discussed whether we considered let-chains (if let pat = expr && let pat2 = expr2) and is (if expr is pat && expr2 is pat2) mutually exclusive, such that accepting one made us disinclined to consider the other.

The consensus from the meeting was that we consider these features both potentially valuable, and that accepting one does not preclude us from considering the other on the sole basis of having more than one way to do something.

Filing this issue to record and confirm that consensus.

To be clear, this consensus would not mean* that we are committing to accept is, just that we don't think the two features are inherently mutually exclusive.

@joshtriplett
Copy link
Member Author

@rfcbot merge

@rfcbot
Copy link
Collaborator

rfcbot commented Nov 9, 2024

Team member @joshtriplett has proposed to merge this. The next step is review by the rest of the tagged team members:

No concerns currently listed.

Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up!

cc @rust-lang/lang-advisors: FCP proposed for lang, please feel free to register concerns.
See this document for info about what commands tagged team members can give me.

@rfcbot rfcbot added proposed-final-comment-period disposition-merge The FCP starter wants to merge (accept) this labels Nov 9, 2024
@traviscross
Copy link
Contributor

traviscross commented Nov 9, 2024

@rfcbot reviewed

I don't know where we'll land on is, but we need to follow through on let chains. It's OK if we have two ways to do things sometimes. Often one is better in one place and another in another place. And there are path dependencies that reasonably lead to this. So I would not raise the existence of if-let chains as an argument against is.

@tmandry
Copy link
Member

tmandry commented Nov 13, 2024

I'm fine with saying that we will still consider is, even though let-chains exist. It's okay in principle if there is more than one way to express something. We should of course still consider every feature in the context of the language as it exists and make sure it still carries its weight.

@rfcbot reviewed

@rfcbot rfcbot added the final-comment-period The FCP has started, most (if not all) team members are in agreement label Nov 13, 2024
@rfcbot
Copy link
Collaborator

rfcbot commented Nov 13, 2024

🔔 This is now entering its final comment period, as per the review above. 🔔

@scottmcm
Copy link
Member

I'm happy to say we're not going to immediately dismiss a proposal for is just based on the existence of let chains. It's not dispositive on its own.

That said, it absolutely needs to be considered. "You can do similar things with let chains" is absolutely something that I would expect to be in the Disadvantages section of a hypothetical RFC for is, and I'd probably block an is RFC that didn't discuss that conflict.

And I could absolutely imagine a version of is that means I stop using if let entirely, let alone let chains. So in some ways I could see them becoming defacto mutually exclusive.

But under the interpretation of my first paragraph here, and knowing it's not a one-way door anyway,
@rfcbot reviewed

@rfcbot rfcbot added finished-final-comment-period and removed final-comment-period The FCP has started, most (if not all) team members are in agreement labels Nov 23, 2024
@rfcbot
Copy link
Collaborator

rfcbot commented Nov 23, 2024

The final comment period, with a disposition to merge, as per the review above, is now complete.

As the automated representative of the governance process, I would like to thank the author for their work and everyone else who contributed.

This will be merged soon.

@rfcbot rfcbot added the to-announce Not yet announced MCP proposals label Nov 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
disposition-merge The FCP starter wants to merge (accept) this finished-final-comment-period T-lang to-announce Not yet announced MCP proposals
Projects
None yet
Development

No branches or pull requests

5 participants