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 spec out of date #46

Open
10 tasks
gafter opened this issue Feb 9, 2017 · 0 comments
Open
10 tasks

Pattern-matching spec out of date #46

gafter opened this issue Feb 9, 2017 · 0 comments
Assignees
Labels

Comments

@gafter
Copy link
Member

gafter commented Feb 9, 2017

The checked-in pattern matching spec is fairly out-of-date, and should be updated per recent discussion and implementation. Specifically,

  • The syntactic disambiguation that was added to support patterns in the is-expression needs to be described.
  • The use of a wildcard in a type pattern should be described.
  • There is an ambiguity between a positional pattern ( 1 ) and a constant pattern with a parenthesized expression. That needs to be resolved, and probably requires some design work.
  • The section on the scope of pattern variables should refer to the C# 7 specification.
  • The section on a user-defined operator is should be rewritten to refer to a Deconstruct method.
  • The spec doesn't describe subsumption as it applies to the switch statement (intuitively, that a case that cannot handle something already handled by a previous case is an error).
  • The match-expression requires some design work.
  • The throw-expression can be removed (it was added in C# 7)
  • I believe we decided to remove the "destructuring assignment" statement.
  • It isn't clear if we want a shorthand for a one-arm pattern-matching expression.

Also, some sections of the spec template are missing, such as links to design notes.

@gafter gafter added the Spec label Feb 9, 2017
@gafter gafter self-assigned this Feb 9, 2017
@gafter gafter added this to Spec TODO in Pattern-Matching Jan 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Development

No branches or pull requests

1 participant