Re: [RFC] Short Closures 2, aka auto-capture take 3
| From: | Arnaud Le Blanc | Date: | Fri, 01 Jul 2022 12:49:21 +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-118152@lists.php.net to get a copy of this message | ||
Hi Björn,
On Wed, Jun 29, 2022 at 8:09 PM Björn Larsson via internals <
internals@lists.php.net> wrote:
> Would it be an option to include a "Future scope" with the features:
> - Explicit capture that list only the variables to be captured by value
> or reference, nothing else.
> - Extending the traditional anonymous function with use(*) for capturing
> everything.
>
> Anyway, hope this passes for PHP 8.2!
>
Thank you for the suggestion. The RFC now includes a Future Scope section.
The extension of traditional anonymous functions is discussed separately in
the "Alternative implementations" section.
Regards,