What would you propose as the syntax?
int b = 0;
^(int a) {
return a*b;
}
The declaration for lambda variables is almost identical to function pointers, just with a ^ instead of a *, so there's nothing to learn (or unlearn, like C++ forces you to). The ^ looks like a lambda, and historically the lambda of lambda calculus actually was a caret accent over the variable. The argument list can be elided.http://researchblogs.cs.bham.ac.uk/thelablunch/2016/05/why-i...
Something like:
lambda(arguments):capture list {...}
Just seems way more clear. Looks more like a function or a class (and a lambda is sort of an in-between kind of thing anyway)