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

From: Date: Mon, 04 Jul 2022 09:47:03 +0000
Subject: Re: [RFC][Vote] Auto-capture closures
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-118175@lists.php.net to get a copy of this message
Hi there, Greetings, Internalians. > > The vote for auto-capture closures is now open. It will run until 15 July. > > https://wiki.php.net/rfc/auto-capture-closure > Thanks for the RFC, I voted yes as I think the optimized auto-capturing logic is sound. Having "function()" still be a first-class citizen is also important to me as there are cases where one might prefer the explicit nature of capturing, so I join Rowan on this "rhetoric" topic. 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? Nicolas

« previous php.internals (#118175) next »