-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
RFC: Reserve throw
and fail
as keywords in edition 2018
#2441
Conversation
👍 Thanks for posting this, @Centril. The keyword reservation is definitely the critical part right now, and the overall cost of doing so is tiny, since it can be unreserved against at any time. While I'm personally in favour of some feature in this space, I'm also perfectly happy to set aside the whole discussion of whether it's needed or what its semantics should be until after the edition. |
These keyword reservations are starting to get frighteningly close to home. $ rg '^[^/]*[^\[/]\bfail\b'
src/tasks/config/lib.rs
329: #[serde(default = "self::defaults::ev_loop::fail")]
330: pub fail: bool,
380: pub(crate) fn fail() -> bool { true }
src/tasks/cmd/relaxation.rs
193: if self.config.fail {
415: fail: f64,
423: sc_token.deconstruct(fail, supercell)? (I'm surprised I don't have any closures named Oh, about the |
I double checked |
@Centril Hmm.... then again, (Notably, |
@ExpHP Hmm... are attributes affected by keywords? |
Okay, so I did a proper test of this. #[macro_use] extern crate serde_derive;
extern crate serde;
#[derive(Serialize)]
#[if]
struct Foo {
#[serde(rename_all = "lolol")]
a: i32,
} I expect one of two outcomes:
Er, they both failed? ...okay, that's not what I expected to see, but due to the first error I'd say this falls under the first bullet. My guess is keywords are currently forbidden here to simplify |
The Is there any reason that this unpopularity will change within the next three years? Also, reserving |
I have every confidence some people who dislike the existing error sugar or would rather not use concurrency sugar either will remain opposed to sugar in this area in the future too. But there are plenty of things that could change. There may be people who
And, of course, RFCs aren't a popularity contest anyway.
I disagree, just like reserving |
Surely, the merge descision of an RFC shouldn't sway if there as 30 upvotes and 29 downvotes and now two more people downvote the RFC. But here the number of downvotes is five times larger than the upvotes. That's plenty of room for a sizeable amount of people to change their mind or who are only 👎 because of the keyword choice. The statement "RFCs aren't a popularity contest" is technically correct, but doesn't imply that popularity, especially unpopularity, doesn't play any role at all. Note that for most RFCs, even those which get refused by the language team, there is a "popularity bonus": the number of 👍 is often larger than the number of 👎. So if there is an RFC where the number of 👎 is so much bigger than the number of 👍 , it is a clear sign that the community dislikes it.
|
This is uncharitable. He's also the one who updated the tracking issue to include it on the same day it was opened. I don't believe there was any malice or subterfuge or anything at all like that involved. |
@scottmcm okay I've redacted that particular statement. |
I think that
At the core, those are the same feature with the same syntax. But over those 15 months, experience and tweaking took Will that happen for |
I don't particularly like to debate 👍 and 👎s. I find there are more important things to do. There were a number of people who were in favor of the proposal who didn't use GitHub's "voting" system. Honestly, at this point, I'd like to revisit @nikomatsakis's point about letting @rfcbot remove 👎s from RFCs with the core team's blessing since these "vote tallies" are being used as arguments from time to time. |
Anyway, there are currently no arguments against reserving |
Hey, here is a naive question from a naive, Rust-excited reader. I am aware that I do not understand everything that these considerations imply. Considering discussions here and there, and since it has come to a (legitimate) questionning about "popularity contests" and what to decide when one gets further off from unanimity, I keep wondering about the reasons we are willing to cling to something that feels fundamentally splitting off. My basic feeling here is that |53 👍 44 👎 16 😕| can either mean that:
So, do you think that all these arguments in favour or defavour of a How likely is the project to branch, so that some could explore the Is there, somewhere deep inside the roots of Rust project, anything prepared for the day that two strong, separated branches will be willing to merge again? :') |
Several comments in #2426 are concerned that, by developing Several people (myself included) have proposed a
|
@rfcbot fcp merge This was discussed in the meeting today; let's move forward pending a concern I'll add... |
Team member @scottmcm has proposed to merge this. The next step is review by the rest of the tagged teams: Concerns:
Once a majority of reviewers approve (and none object), 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! See this document for info about what commands tagged team members can give me. |
@rfcbot concern use in macros and attributes To ensure that this doesn't effect |
That would be me, and apologies for not getting to it sooner! The overwhelming sentiment during the meeting was that we are all tired of having heated arguments about keywords for not-yet-existent features, and are eager to put this issue to bed. That said, feelings about how to do that varied...
A key point is how confident we feel that we can add some reasonable mechanism for within-edition reservations (like I proposed earlier). I'm not aware of strong opposition to an idea along these lines, but as always it's hard to predict how things will play out. @nikomatsakis and I felt particularly strongly that up-front reservations are wrong and a mistake in the initial Edition proposal, basically for the reasons I've already outlined in the thread: they force up-front decisions about surface issues of features that are not yet fully proposed, let alone accepted or implemented. That just seems totally backwards and is going to keep leading to unworkable discussions. We both feel that the role of Editions here is that they can absorb any keyword-flags that have accumulated in the meantime. In all, there is certainly no consensus to merge this RFC as-is, and I think there are no objections to instead closing it, under the assumption that we'll add a keyword-flag mechanism (or something like it) as needed later. Given all that: @rfcbot fcp cancel |
@aturon proposal cancelled. |
@rfcbot fcp close |
Team member @aturon has proposed to close this. The next step is review by the rest of the tagged teams: No concerns currently listed. Once a majority of reviewers approve (and none object), 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! See this document for info about what commands tagged team members can give me. |
I feel that up-front keyword reservations are the correct call, but I can appreciate that I may be in the minority here. I'd much prefer a liberal reservation of keywords. We'll see how it goes :) |
I don't feel strongly enough to block, but
@rfcbot reviewed |
🔔 This is now entering its final comment period, as per the review above. 🔔 |
That's likely to occur after the edition. And it'll likely be "plans", plural, since there's a great deal of discussion still to be had before we get anywhere close to a consensus. |
I meant a plan for an alternative to keyword reservations, not about any particular feature. Is there some lexical space we have available to use until a new edition shows up? Or maybe a plan to schedule regular editions, to help get some of the "it's ok, I'll just catch the next train" we have for normal stable? |
A good place to start may be "Idea"/"Pre-Pre-RRC" discussions for @aturon's keyword flags on internals. I question whether it will distract too much from 2018, though. Closing this RFC isn't beneficial if it would merely move the conflict around. |
The final comment period, with a disposition to close, as per the review above, is now complete. By the power vested in me by Rust, I hereby close this RFC. |
🖼️ Rendered
📝 Summary
Reserve
throw
andfail
in edition 2018.🎵 Note
This RFC separates out the urgent question of keyword reservation from RFC #2426.
It does not prescribe actually adding a
fail expr
orthrow expr
construct to the language.