meetings/2016/LDM-2016-10-18.md
Go over C# 7.0 features one last (?) time to make sure we feel good about them and address remaining language-level concerns.
new expressionsIf we want to reopen the discussion of using _, and it doesn't make C# 7.0, we may find ourselves wanting to block off use of _ as an ordinary identifier in the new declaration contexts (patterns, deconstruction, out vars). Let's front load the final design of wildcards to decide if anything needs to happen here.
case (int, int) x: is not currently allowed, in order to leave design space. More specifically we want this to mean a recursive pattern, rather than just a tuple type, once we get to recursive patterns. We're good with leaving this an error in the meantime, even though it may occasionally be puzzling to developers.
We want to ideally allow any expression or set of statements to be lifted out in a local method. There are two ways in which this cannot be realized:
We don't allow leading or trailing underbars - they have to be between digits: they are digit separators after all! We think this is fine, but if we hear feedback to the contrary we can try to relax it later.
They are allowed as expression bodies, as the second operand of ??, and as the second and third operand of ?:. They are not allowed in && and ||, and cannot be parenthesized. We think this is a fine place to land.
We don't currently warn about names moving to a different position. Should we?
(int first, int last) M() ...
(int last, int first) t = M(); // Oops!
Ideally yes. There are a lot of weird cases that would be hard to track down, though. Let's get the obvious ones. Essentially where we do implicit conversions we would check and warn.
newYou cannot new up a tuple type. However, we should certainly allow arrays of tuples to be created. It is probably also fine to keep allowing newing of nullable tuple types:
var array = new (int x, int y)[10]; // Absolutely
var nullable = new (int x, int y)?(); // Why not?