-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Open
Description
Enhanced switch statments
- Specification: https://github.com/dotnet/csharplang/blob/159fb27e434f9bc41362f65e5ff9fe16647c4dd2/proposals/enhanced-switch-statements.md
- Discussion: Proposal: Enhanced switch statements #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 #8607 and can be done independently, but was conceived of as taking #8607 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