dotnet / dotnet/csharplang

Champion "Pattern Matching" (16.3, Core 3)

Open
#45 16 comments 26 reactions 1 assignee Claimed by @gafter View on GitHub
Implemented Needs ECMA Spec Proposal champion
Dominant language
C#
Stars
12.7k
Forks
1.1k
Avg merge
11h 1m
Merged PRs (30d)
3

Description

- [x] Proposal added: [proposals/patterns.md](https://github.com/dotnet/csharplang/blob/master/proposals/patterns.md)
- [x] Discussed in LDM
- [ ] Decision in LDM
- [ ] Finalized (done, rejected, inactive)
- [ ] Spec'ed

Update: We take this to represent recursive patterns and match expressions. Active patterns should be tracked separately, as they won't happen at the same time.

LDM notes:
- https://github.com/dotnet/csharplang/blob/master/meetings/2017/LDM-2017-11-29.md
- https://github.com/dotnet/csharplang/blob/master/meetings/2018/LDM-2018-04-30.md
- https://github.com/dotnet/csharplang/blob/master/meetings/2018/LDM-2018-05-02.md#revisit-syntax-for-switch-expression
- https://github.com/dotnet/csharplang/blob/master/meetings/2018/LDM-2018-10-24.md#pattern-matching-open-issues
- https://github.com/dotnet/csharplang/blob/master/meetings/2018/LDM-2018-11-05.md#pattern-matching
- https://github.com/dotnet/csharplang/blob/master/meetings/2018/LDM-2018-11-14.md#switch-exhaustiveness-and-null
- https://github.com/dotnet/csharplang/blob/master/meetings/2019/LDM-2019-01-09.md#ambiguities-in-nullable-array-types-again (syntactic ambiguities, trailing commas)
- https://github.com/dotnet/csharplang/blob/master/meetings/2019/LDM-2019-03-06.md#pure-checks-in-switch-expression (pure tests)
- https://github.com/dotnet/csharplang/blob/master/meetings/2019/LDM-2019-03-13.md#precedence-of-the-switch-expression (precedence, `or`, pure null tests)
- https://github.com/dotnet/csharplang/blob/master/meetings/2019/LDM-2019-04-22.md#target-typed-switch-expression (target-typed switch expression)
- https://github.com/dotnet/csharplang/blob/master/meetings/2019/LDM-2019-07-10.md (empty switch statement)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.