Re: [RFC] Auto-capture multi-line closures and short functions take 2

From: Date: Sun, 25 Apr 2021 19:42:05 +0000
Subject: Re: [RFC] Auto-capture multi-line closures and short functions take 2
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-114158@lists.php.net to get a copy of this message
On Wed, Mar 24, 2021, at 11:19 AM, Larry Garfield wrote: > Greetings, Internalians. > > Some months back I proposed an RFC for short functions. > > https://wiki.php.net/rfc/short-functions > > After some discussion, I put it on hold to ensure that it was > compatible with the other discussion floating about around an alternate > syntax for multi-line closures that did auto-capture. It's important > that the syntax of both proposals is consistent. > > Nuno Maduro and i have talked recently and worked out the syntax that > is consistent between both proposals. That takes 'fn' off the table > for short-functions, for reasons discussed in both RFCs. > > To that end, I offer: > > 1) The updated short-functions RFC: > https://wiki.php.net/rfc/short-functions > > 2) A new RFC, code by Nuno, for auto-capturing multi-statement > closures: https://wiki.php.net/rfc/auto-capture-closure > > These are separate RFCs and at this time we plan to send them to > separate votes, but I list them together to demonstrate that they have > been developed in a mutually-compatible way. > > Further details in the auto-capture-closure RFC. Hi folks. We've recently added some additional reasoning to the auto-capture-closure RFC, so it's worth giving another read-over. It was also recently featured on an episode of PHP Internals if you want a more verbal case made. :-) Unless there is any significant feedback, we'll be calling a vote for this RFC sometime late this week (Thursday/Friday-ish). Cheers. --Larry Garfield

« previous php.internals (#114158) next »