Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:105950 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 44634 invoked from network); 16 Jun 2019 14:50:41 -0000 Received: from unknown (HELO localhost.localdomain) (76.75.200.58) by pb1.pair.com with SMTP; 16 Jun 2019 14:50:41 -0000 To: internals@lists.php.net References: Date: Sun, 16 Jun 2019 13:04:35 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit X-Posted-By: 94.1.167.52 Subject: Re: [PHP-DEV][RFC] Alternative "use" syntax for Closures From: markyr@gmail.com (Mark Randall) Message-ID: On 15/06/2019 22:53, Wes wrote: > Hello PHP, I just published > https://wiki.php.net/rfc/alternative-closure-use-syntax > I would love your opinion on this I'm not overly fond of it myself because I think it could make it slightly more difficult to parse in my brain. If there was a: $x = 0; $y = 1; $closure = function() use (...) { }; Where "use (...)" would auto-capture all of the used variables in a similar manner to short closures, that would certainly save a bit of time. -- Mark Randall