>As far as we are aware, only two languages in widespread use require variables to be explicitly closed over: PHP and C++. All other major languages capture implicitly, as is proposed here.
to be fair to c++, it supports [&] to capture everything, like int a=1,b=2,c=3;[&]()->void{std::cout << a << b << c;}(); On Fri, 1 Jul 2022 at 16:05, Larry Garfield <la...@garfieldtech.com> wrote: > Greetings, Internalians. > > The vote for auto-capture closures is now open. It will run until 15 July. > > https://wiki.php.net/rfc/auto-capture-closure > > -- > Larry Garfield > la...@garfieldtech.com > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: https://www.php.net/unsub.php > >