[Proposal]: Enhanced switch statments
@333fred is already working on this.
Since Nov 18, 2024.
- Dominant language
- C#
- Stars
- 12.7k
- Forks
- 1.1k
- Avg merge
- 11h 1m
- Merged PRs (30d)
- 3
Description
Enhanced switch statments
- Specification: https://github.com/dotnet/csharplang/blob/159fb27e434f9bc41362f65e5ff9fe16647c4dd2/proposals/enhanced-switch-statements.md
- Discussion: https://github.com/dotnet/csharplang/discussions/8608
Summary
This proposal is an enhancement to the existing switch statement syntax to permit switch-expression-style arms instead of using case statements. This feature is orthogonal to https://github.com/dotnet/csharplang/issues/8607 and can be done independently, but was conceived of as taking https://github.com/dotnet/csharplang/issues/8607's switch expressions and applying them to switch statements.
Design meetings
https://github.com/dotnet/csharplang/blob/main/meetings/2022/LDM-2022-08-31.md#switch-expression-as-a-statement
https://github.com/dotnet/csharplang/blob/main/meetings/2022/LDM-2022-09-26.md#discriminated-unions
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.