-
Notifications
You must be signed in to change notification settings - Fork 16
Rename some RegionKind variants to be inline with TyKind/ConstKind #95
Copy link
Copy link
Closed
Labels
T-typesAdd this label so rfcbot knows to poll the types teamAdd this label so rfcbot knows to poll the types teamfinal-comment-periodThe FCP has started, most (if not all) team members are in agreementThe FCP has started, most (if not all) team members are in agreementmajor-changeA major change proposalA major change proposalmajor-change-acceptedAn accepted major change proposalAn accepted major change proposalto-announceAnnounce this issue on triage meetingAnnounce this issue on triage meeting
Metadata
Metadata
Assignees
Labels
T-typesAdd this label so rfcbot knows to poll the types teamAdd this label so rfcbot knows to poll the types teamfinal-comment-periodThe FCP has started, most (if not all) team members are in agreementThe FCP has started, most (if not all) team members are in agreementmajor-changeA major change proposalA major change proposalmajor-change-acceptedAn accepted major change proposalAn accepted major change proposalto-announceAnnounce this issue on triage meetingAnnounce this issue on triage meeting
Type
Fields
Give feedbackNo fields configured for issues without a type.
Proposal
I would like to rename:
RegionKind::EarlyBoundtoRegionKind::EarlyParamRegionKind::FreetoRegionKind::LateParamRegionKind::LateBoundtoRegionKind::BoundI find this to be far more consistent with
TyKind/ConstKind. It's taken me a while for it to properly stick what all the 3 variants are onRegionKindsince they're so differently named thanTyKind, and also have an entire extra variant for representing lifetime parameters. I think the meaning ofRegionKind::Freewould have been a lot clearer withRegionKind::LateParam.I also think it's kind of confusing that
RegionKind::EarlyBoundgets used for early bound generic paramaters but we do not useRegionKind::LateBoundfor late bound generic parameters. I think its unnecessarily confusing to draw a parallel betweenReLateBound/ReEarlyBoundand the concept of late/early bound generic parameters so directly when it does not actually apply. I am comfortable with drawing the parallel betweenEarlyParam/LateParamsince it does not actually say Early/Late bound and in this case the parallel is actually present.I would also like to avoid drawing a similarity between generic parameters and bound vars right now since we do not actually represent params with bound vars right now (and if we did we'd have to rename
RegionKind::LateBoundtoRegionKind::Boundanyway).Renaming
EarlyBound/Freeis it a bit of a wasted effort if we end up removing them in favor of placeholders and boundvars but this seems really simple to do wheras it's probably more complex to replace our param representation with bound vars as was briefly discussed in the t-types meeting on early/late bound parameters.I do not work with regions very much since I don't touch borrowck much. I'd feel much more comfortable if someone who has spent a fair amount of time working with regions would approve this or say this is a coherent naming scheme for the regions.
Mentors or Reviewers
I can review this or implement this or mentor this. I think really anybody on t-compiler-contributors or t-types is qualified to do any of those 3 things.
Process
The main points of the Major Change Process are as follows:
@rustbot second.-C flag, then full team check-off is required.@rfcbot fcp mergeon either the MCP or the PR.You can read more about Major Change Proposals on forge.
Comments
This issue is not meant to be used for technical discussion. There is a Zulip stream for that. Use this issue to leave procedural comments, such as volunteering to review, indicating that you second the proposal (or third, etc), or raising a concern that you would like to be addressed.