Re: [RFC][Vote] Auto-capture closures

From: Date: Sat, 02 Jul 2022 03:01:58 +0000
Subject: Re: [RFC][Vote] Auto-capture closures
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-118159@lists.php.net to get a copy of this message
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

« previous php.internals (#118159) next »