-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Add list patterns proposal #3245
Conversation
Really nice work! List initializers (e.g. in an object creation expression) look like |
Unfortunately, with braces, empty list pattern would be ambigious with property pattern clause. |
I would suggest allowing pattern based enumeration as well, same as foreach. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done with review pass (iteration 11)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM Thanks (iteration 12) with minor follow-up comments.
Tagging @333fred for a second look. Thanks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple of clarity comments.
Cool. Thanks for writing this up and sorting many questions. We'll start looking at your roslyn-side change now :-) |
Tracking issue: #3435
Discussion: #1510, #1039, #898
Prototype: dotnet/roslyn@main...alrz:list-patterns
Proposal: Rendered