Here's what I said on the precious thread.
This is in fact the scoping ambiguity I was referring to: what of the surrounding context expr, if any, is included in the lambda, and why? The _
syntax makes that as clear as mud, and I don't think it's helpful to have to go figure it out at every occurrence.
And even if the proposal says the closest scope, that's still something that would have to be looked up and learned. That then has to be weighed against the benefit, which, other than a 2nd set of syntax for closures, is what exactly? That's still unclear to me.
In the meantime I could add another issue:
The _
syntax is already used for pattern matching. Now patterns aren't exprs, and so on a technical level it might be able to be squeezed into the grammar.
But that leaves the human interface problem: suddenly _
means 2 different and only tangentially related things depending on whether they're used in pattern or expr context.
This seems likely to be confusing and thus doesn't make much sense to me.
That was one of my criticisms as well: even in the best, most optimal scenario, using _
rather than a 1-character identifier like x
isn't even going to be shorter, except for maybe eliding the param list - but that param list is precisely what clearly demarcates the body of the lambda in the first place. Even if not grammatically speaking, it's just easier to parse as a human being.
What it provides is a name for each param, just like everywhere else in the language. In other words, it's more consistent with the rest of Rust, making it less surprising and easier to work with.
As for the |..|
syntax, there we run into the pattern/expr duality confusion again. And once again, even if grammatically feasible, it isn't clear why this would be worth having at the expense of clarity: does the ..
mean something lambda related, or is it saying "I don't care about the rest of the (sub-)pattern", like it does in patterns? Note that patterns can be used in param lists today, which allows for destructuring of params.
I've seen this convention used before in an academic setting. I found it insufferably inelegant then, and I notice that my opinion on that front hasn't changed. But granted, this is subjective.
If such a proposal were to ever be accepted, these things would need to be addressed first I think.