carbon-lang
carbon-lang copied to clipboard
choice: don't require empty `()`
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.
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.
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