Re: [RFC] Short Closures 2, aka auto-capture take 3
| From: | Arnaud Le Blanc | Date: | Mon, 13 Jun 2022 09:35:55 +0000 |
| Subject: | Re: [RFC] Short Closures 2, aka auto-capture take 3 | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-117925@lists.php.net to get a copy of this message | ||
On dimanche 12 juin 2022 19:54:06 CEST Mark Baker wrote:
> Did many of those closures use "pass by reference" in the use clause,
> because that's one real differentiator between traditional closures and
> short lambdas. There's also the fact that use values are bound at the
> point where the closure is defined, not where it's called (if they even
> exist at all at that point), although that's probably more difficult to
> determine.
Please note that auto-capture binds variables at function declaration. This is
the case in Arrow Functions, and is inherited by this RFC.