Re: [RFC][Vote] Auto-capture closures
| From: | Arnaud Le Blanc | Date: | Mon, 04 Jul 2022 17:36:57 +0000 |
| Subject: | Re: [RFC][Vote] Auto-capture closures | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-118180@lists.php.net to get a copy of this message | ||
Hi,
On lundi 4 juillet 2022 11:47:03 CEST Nicolas Grekas wrote:
> I'm just wondering if there could be a way to enable the auto-capture
> optimization for arrow functions. Having three kinds of rules for capturing
> feels too much, especially when there are that subtles for short closures.
> Maybe a deprecation could be possible for affected arrow functions?
Yes. I will propose this after this RFC.
This is not included in the RFC because the optimization rarely have an impact
on Arrow Functions (they rarely bind variables).