Skip to content

Provisionally add let/var...else to the design overview #1388

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

Closed
wants to merge 2 commits into from

Conversation

josh11b
Copy link
Contributor

@josh11b josh11b commented Jul 14, 2022

@josh11b josh11b requested review from a team as code owners July 14, 2022 17:05
Copy link
Contributor

@zygoloid zygoloid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, not merging to give others time to look and express an opinion.

Comment on lines +1165 to +1166
**Note:** This is provisional, this design has not been through the proposal
process yet.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you help me understand the motivation for documenting this prior to formally proposing/adopting it? Unlike the initial stuff in #83 or your more recent design doc updates, this doesn't seem like it will help bootstrap the language design or provide important context, and unlike the discussion of const in #1378, I don't think this is something people will be asking about if we don't address it.

Copy link
Contributor Author

@josh11b josh11b Jul 15, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It actually came up because I was trying to figure out what belonged in "refutable patterns" versus "match control flow statement" when working on the design overview. (Resolution: the if clause is part of the case part of a match, not refutable patterns in general because they aren't as clearly useful for let/var...else.) It seemed like there were any design questions left for this feature after the Discord discussion, so I thought I'd just put a quick write up to show the direction we were thinking. I'm happy to follow this up with a real proposal, but I didn't expect that the leads would have the bandwidth to land one of those before the going-public talk, and I wanted to flesh out this design overview with as much of what we were thinking as I could before it got a lot of viewers.

I do think it is helpful to start pinning this down for thinking about the pattern matching (and possibly error handling) design space.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FWIW, I'm happy either way, no strong opinion.

I have lots of questions in this space, but I'm fine with the provisional writeup here. I don't think its going to cause deep misunderstandings even if we end up changing anything, or be off-putting for folks in any way absent a full rationale.

I wasn't part of the Discord discussion, I'd defer to @zygoloid and @KateGregory here.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FWIW I'm not worried about misunderstandings, I'm worried about anchoring.

For example, I think there's at least one major design question that the Discord discussion doesn't really address, which is whether we should have this feature at all. There may be other combinations of pattern matching/error handling features which would make this one superfluous, but I think this being in the language design, even provisionally, will tend to steer us away from considering them.

I understand the desire to put as much of what we're thinking as possible in front of people when we go public, but I don't think this is the right venue for that. docs/design should be the current actual design of Carbon, as determined by the evolution process, not our informal thoughts about where the evolution process will go in the future.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@josh11b created an issue to create a proposal out of this: #1758

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@geoffromer: Writing a propsal here: #1871 (WIP).

Copy link
Contributor

@chandlerc chandlerc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Content looks fine to me, but deferring to other leads on whether to include in the main doc as I wasn't really following their discussion.

Comment on lines +1165 to +1166
**Note:** This is provisional, this design has not been through the proposal
process yet.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FWIW, I'm happy either way, no strong opinion.

I have lots of questions in this space, but I'm fine with the provisional writeup here. I don't think its going to cause deep misunderstandings even if we end up changing anything, or be off-putting for folks in any way absent a full rationale.

I wasn't part of the Discord discussion, I'd defer to @zygoloid and @KateGregory here.

rscircus pushed a commit to rscircus/carbon-lang that referenced this pull request Aug 1, 2022
@github-actions
Copy link

We triage inactive PRs and issues in order to make it easier to find active work. If this PR should remain active, please comment or remove the inactive label.
This PR is labeled inactive because the last activity was over 90 days ago. This PR will be closed and archived after 14 additional days without activity.

@github-actions github-actions bot added the inactive Issues and PRs which have been inactive for at least 90 days. label Oct 31, 2022
@github-actions
Copy link

We triage inactive PRs and issues in order to make it easier to find active work. If this PR should remain active or becomes active again, please reopen it.
This PR was closed and archived because there has been no new activity in the 14 days since the inactive label was added.

@github-actions github-actions bot closed this Nov 15, 2022
@josh11b josh11b deleted the else branch September 18, 2024 21:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
inactive Issues and PRs which have been inactive for at least 90 days.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants