Roslyn: Expression trees support for tuples.

Created on 3 Aug 2016  路  4Comments  路  Source: dotnet/roslyn

We should consider supporting expressions with tuples in expression tree lambdas.

It can be done either by
1) Introducing new nodes that represent tuple creation/conversion/field accesses 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 tuple conversions 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 tuple conversion lowering in a context of expression trees to be significantly different.

Option 1 seems more attractive to me at the moment.

Area-Compilers Bug Language-C# Language-VB New Language Feature - Tuples

All 4 comments

which status on this?

Any news about this 4 years old proposal?

Any news about this 4 years old proposal?

Nope. No news.

Was this page helpful?
0 / 5 - 0 ratings