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

choice: don't require empty () #2097

Closed
jonmeow opened this issue Aug 24, 2022 · 2 comments
Closed

choice: don't require empty () #2097

jonmeow opened this issue Aug 24, 2022 · 2 comments
Labels
explorer Action items related to Carbon explorer code inactive Issues and PRs which have been inactive for at least 90 days.

Comments

@jonmeow
Copy link
Contributor

jonmeow commented Aug 24, 2022

https://github.com/carbon-language/carbon-lang/blob/trunk/docs/design/README.md#choice-types has example code:

choice IntResult {
  Success(value: i32),
  Failure(error: String),
  Cancelled
}

...

  case .Cancelled => {
    Terminate();
  }

Right now, it would be Cancelled() with parentheses: https://carbon.compiler-explorer.com/z/3dnK4xP38

Probably the right choice here is to not require parentheses in the explorer, although that'll probably require some extra handling of choices so that the parentheses are only conditionally required.

@jonmeow jonmeow added the explorer Action items related to Carbon explorer code label Aug 24, 2022
@jonmeow jonmeow changed the title Choice: don't use empty () choice: don't use empty () Aug 24, 2022
@jonmeow jonmeow changed the title choice: don't use empty () choice: don't require empty () Aug 24, 2022
@github-actions
Copy link

We triage inactive PRs and issues in order to make it easier to find active work. If this issue should remain active or becomes active again, please comment or remove the inactive label. The long term label can also be added for issues which are expected to take time.
This issue is labeled inactive because the last activity was over 90 days ago.

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

Closing explorer-specific issues as not-planned for now due to our decision to prioritize working on the toolchain over other implementation work in the near term: https://github.com/carbon-language/carbon-lang/blob/trunk/proposals/p3532.md

@chandlerc chandlerc closed this as not planned Won't fix, can't repro, duplicate, stale Jan 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
explorer Action items related to Carbon explorer code inactive Issues and PRs which have been inactive for at least 90 days.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants