Champion "and, or, and not patterns" (VS 16.8, .NET 5)
- [ ] Proposal added - [ ] Discussed in LDM - [ ] Decision in LDM - [ ] Finalized (done, rejected, inactive) - [ ] Spec'ed The idea is to add three new pattern forms 1. *pattern* `and` *pattern* 2. *pattern* `or` *pattern* 3. `not` *pattern* The latter two would not be permitted to define pattern variables in the subpatterns (as they would never be definitely assigned). We'd have to decide on syntax and precedence, and whether some mechanism such as parentheses could be used for grouping patterns to override precedence. Examples: ``` c# switch (o) { case 1 or 2: case Point(0, 0) or null: case Point(var x, var y) and var p: } ```
Posted by gafter on Mar 1, 2018, 4:00 PM
Tags
Related issues
- struct's lifetime requirements can be bypassed via covariant field assignment
- Proposal to Reorganize the Moderation Team and Review Moderation Policies
- Progressive FPS degradation appears to be related to dota2.com — blocking the domain prevents the performance loss
- proposal: container/...: generic collection types
- Better Custom Endpoint BYOK
- A concrete policy for backward compatibility until Godot 5.0
Raise real-world problems, find people facing the same issue, and discuss solutions.4,000 issues0 comments
github (Other)
struct's lifetime requirements can be bypassed via covariant field assignment
Proposal to Reorganize the Moderation Team and Review Moderation Policies
Progressive FPS degradation appears to be related to dota2.com — blocking the domain prevents the performance loss
proposal: container/...: generic collection types
Better Custom Endpoint BYOK
A concrete policy for backward compatibility until Godot 5.0
New MTP models not supported
Tracking: 429 / Capacity Issues
Champion "and, or, and not patterns" (VS 16.8, .NET 5)
- [ ] Proposal added - [ ] Discussed in LDM - [ ] Decision in LDM - [ ] Finalized (done, rejected, inactive) - [ ] Spec'ed The idea is to add three new pattern forms 1. *pattern* `and` *pattern* 2. *pattern* `or` *pattern* 3. `not` *pattern* The latter two would not be permitted to define pattern variables in the subpatterns (as they would never be definitely assigned). We'd have to decide on syntax and precedence, and whether some mechanism such as parentheses could be used for grouping patterns to override precedence. Examples: ``` c# switch (o) { case 1 or 2: case Point(0, 0) or null: case Point(var x, var y) and var p: } ```
Comments (0)
No comments yet. Start the discussion.