On Fri, 2022-07-01 at 16:11 +0200, Hans Henrik Bergan wrote:
> > 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.

But do any of them auto-capture by value?

> to be fair to c++, it supports [&] to capture everything, like
> int a=1,b=2,c=3;[&]()->void{std::cout << a << b << c;}();

I think that's still explicit

-- 
Anton

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: https://www.php.net/unsub.php

Reply via email to