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

[Proposal]: User-defined positional patterns #8613

Open
333fred opened this issue Nov 19, 2024 · 0 comments
Open

[Proposal]: User-defined positional patterns #8613

333fred opened this issue Nov 19, 2024 · 0 comments
Assignees
Milestone

Comments

@333fred
Copy link
Member

333fred commented Nov 19, 2024

User-defined positional patterns

Summary

Defining a named positional pattern which is not bound to a type check.

Exploring a different approach than the one originally presented in #1047 which suggests to relax Deconstruct to return bool.

This proposal does not conflict with bool-returning Deconstruct methods, i.e. both can exist at the same time, but this enables much more flexibility in this space as these patterns have a name of their own rather than just using the type's name.

Design meetings

https://github.com/dotnet/csharplang/blob/main/meetings/2022/LDM-2022-02-16.md#user-defined-positional-patterns

@333fred 333fred added this to the Working Set milestone Nov 19, 2024
@333fred 333fred self-assigned this Nov 19, 2024
@dotnet dotnet locked and limited conversation to collaborators Nov 19, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant