Name elision

In this context possibly not, but there are contexts in which it would be required. For instance, in struct construction it'd be required to avoid ambiguity: func(_ { field }) is constructing a value and passing it to func, while func({ field }) would be ambiguous.

The _ also works in cases where something more needs specifying, such as _::Variant(x), or perhaps even _::new(x).

I'd prefer to see the same syntax used everywhere, both for consistency (since it will be required in some places), and for the didactic value of a "something was omitted/inferred here" marker.

1 Like