Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pattern matching expressions #202

Open
ealeykin opened this issue Dec 8, 2021 · 1 comment
Open

Pattern matching expressions #202

ealeykin opened this issue Dec 8, 2021 · 1 comment

Comments

@ealeykin
Copy link
Contributor

ealeykin commented Dec 8, 2021

It would great to support pattern matching, not sure how complex the implementation is, but for example having the following condition:

value == "match" || value == null

is much more readable with cs pattern matching

value is "match" or null
@metoule
Copy link
Contributor

metoule commented Dec 9, 2021

Relevant documentation : https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/operators/patterns
Relevant specifications : https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/language-specification/expressions#121212-the-is-operator

We can probably focus on the is operator, and ignore the switch statement and expression.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants