Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upRFC: Reserve `throw` and `fail` as keywords in edition 2018 #2441
Conversation
Centril
added
the
T-lang
label
May 14, 2018
This comment has been minimized.
This comment has been minimized.
|
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. |
This comment has been minimized.
This comment has been minimized.
ExpHP
commented
May 14, 2018
|
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 |
This comment has been minimized.
This comment has been minimized.
I double checked |
This comment has been minimized.
This comment has been minimized.
ExpHP
commented
May 14, 2018
•
|
@Centril Hmm.... then again, (Notably, |
This comment has been minimized.
This comment has been minimized.
|
@ExpHP Hmm... are attributes affected by keywords? |
This comment has been minimized.
This comment has been minimized.
ExpHP
commented
May 14, 2018
•
|
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 |
This comment has been minimized.
This comment has been minimized.
|
The Is there any reason that this unpopularity will change within the next three years? Also, reserving |
This comment has been minimized.
This comment has been minimized.
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 |
This comment has been minimized.
This comment has been minimized.
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 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
|
This comment has been minimized.
This comment has been minimized.
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. |
This comment has been minimized.
This comment has been minimized.
|
@scottmcm okay I've redacted that particular statement. |
This comment has been minimized.
This comment has been minimized.
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 |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
I don't particularly like to debate 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 |
This comment has been minimized.
This comment has been minimized.
burdges
commented
May 16, 2018
|
Anyway, there are currently no arguments against reserving |
This comment has been minimized.
This comment has been minimized.
iago-lito
commented
May 17, 2018
|
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
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? :') |
This comment has been minimized.
This comment has been minimized.
illustrious-you
commented
May 17, 2018
|
Several comments in #2426 are concerned that, by developing Several people (myself included) have proposed a
|
This comment has been minimized.
This comment has been minimized.
|
@rfcbot fcp merge This was discussed in the meeting today; let's move forward pending a concern I'll add... |
This comment has been minimized.
This comment has been minimized.
rfcbot
commented
May 17, 2018
•
|
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
added
proposed-final-comment-period
disposition-merge
labels
May 17, 2018
This comment has been minimized.
This comment has been minimized.
|
@rfcbot concern use in macros and attributes To ensure that this doesn't effect |
rfcbot
added
proposed-final-comment-period
disposition-merge
labels
May 17, 2018
scottmcm
self-assigned this
May 17, 2018
Centril
added some commits
May 17, 2018
This comment has been minimized.
This comment has been minimized.
This is already not true-- we have the |
This comment has been minimized.
This comment has been minimized.
This statement isn't true: there are positive responses to this RFC. Denying the existence of opposing viewpoints increases the emotional tension in the conversation & makes it easier for people who are inclined to disagree with you to dismiss your comment outright instead of engaging with it seriously. Anyway, the RFC hasn't been merged despite FCP ending because we talked about it in the lang team meeting last week and didn't have a consensus to merge it based on what has come out in the final comment period. Someone is supposed to leave a summary comment but I'm not sure who (and I don't remember the exact conclusion we reached). |
This comment has been minimized.
This comment has been minimized.
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 |
This comment has been minimized.
This comment has been minimized.
rfcbot
commented
Jun 7, 2018
|
@aturon proposal cancelled. |
rfcbot
removed
the
disposition-merge
label
Jun 7, 2018
This comment has been minimized.
This comment has been minimized.
|
@rfcbot fcp close |
This comment has been minimized.
This comment has been minimized.
rfcbot
commented
Jun 7, 2018
•
|
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. |
rfcbot
added
proposed-final-comment-period
disposition-close
labels
Jun 7, 2018
This comment has been minimized.
This comment has been minimized.
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 :) |
nrc
removed
the
finished-final-comment-period
label
Jun 8, 2018
This comment has been minimized.
This comment has been minimized.
|
I don't feel strongly enough to block, but
@rfcbot reviewed |
rfcbot
added
proposed-final-comment-period
disposition-close
final-comment-period
and removed
proposed-final-comment-period
labels
Jun 8, 2018
This comment has been minimized.
This comment has been minimized.
rfcbot
commented
Jun 8, 2018
|
|
This comment has been minimized.
This comment has been minimized.
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. |
scottmcm
assigned
aturon
and unassigned
scottmcm
Jun 8, 2018
This comment has been minimized.
This comment has been minimized.
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? |
This comment has been minimized.
This comment has been minimized.
illustrious-you
commented
Jun 8, 2018
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. |
rfcbot
added
finished-final-comment-period
and removed
final-comment-period
labels
Jun 18, 2018
This comment has been minimized.
This comment has been minimized.
rfcbot
commented
Jun 18, 2018
|
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. |

Centril commentedMay 14, 2018
•
edited
Reserve
throwandfailin edition 2018.This RFC separates out the urgent question of keyword reservation from RFC #2426.
It does not prescribe actually adding a
fail exprorthrow exprconstruct to the language.