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

Expression trees support for Deconstruction #12899

Open
VSadov opened this issue Aug 3, 2016 · 2 comments
Open

Expression trees support for Deconstruction #12899

VSadov opened this issue Aug 3, 2016 · 2 comments

Comments

@VSadov
Copy link
Member

VSadov commented Aug 3, 2016

We should consider supporting deconstruction (tuples and general) in expression tree lambdas.

It can be done either by

  1. Introducing new nodes that represent Deconstruction or
  2. Use lowered form

Option 1 is more desirable since it is more expressive, but will require introducing new nodes, possibly as a reducible layer on top of the standard ET nodes.

Option 2 could run into problems where deconstruction require temporaries and in the ET version (1.0) those are not available.
It may be possible to use member bindings to avoid this problem, but it is not completely clear if that is possible and it will require that deconstruction lowering in a context of expression trees to be significantly different.

Option 1 seems more attractive to me at the moment.

@gafter
Copy link
Member

gafter commented Sep 19, 2016

This will be much easier once #13270 has been addressed.

@jaredpar jaredpar modified the milestones: 15.1, 16.0 Mar 9, 2017
@jinujoseph jinujoseph modified the milestones: 16.0, 16.3 Jun 9, 2019
@jcouv jcouv modified the milestones: 16.3, Compiler.Next Jul 8, 2019
@jhgbrt
Copy link

jhgbrt commented Jan 1, 2022

Would this also solve dotnet/csharplang#189 (comment) ?

@jaredpar jaredpar modified the milestones: Compiler.Next, Backlog Sep 12, 2023
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

6 participants