Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:114666 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 23770 invoked from network); 29 May 2021 21:37:22 -0000 Received: from unknown (HELO localhost.localdomain) (76.75.200.58) by pb1.pair.com with SMTP; 29 May 2021 21:37:22 -0000 To: internals@lists.php.net References: Date: Sat, 29 May 2021 22:49:42 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.10.2 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: 87.81.129.66 Subject: Re: [RFC] Partial function application From: marandall@php.net (Mark Randall) Message-ID: On 25/04/2021 20:25, Larry Garfield wrote: > It includes an implementation by Joe Watkins that is already about 95% complete. (There's some edge cases he's still sorting out, but all of the typical cases should work already.) Most of the design work comes from Levi Morrison and Paul Crovella. I helped out with the tests, a few edge bits, and general instigator/nudge. :-) Can I be a little pushy and ask for a subvote on "..." vs "...?" It _probably_ won't matter, but with ... being used as the language's universal variadic / unpack, we may use it for similar things in the years to come, and I think it makes sense to pre-empt a potential conflict or source of confusion down the line by using "...?". Just as a variadic function argument is ...$ a variadic partial closure would be ...? I do not, at this time, have a firm example of where this might become a problem, otherwise I would state it. The closest I can think of for now is that it's entirely possible that auto-capturing multiline functions may end up using: $x = function() use (...) { /* */ } Which could possibly be confusing. Not a definiative example by any stretch, but but I do get the feeling that, as we can future proof it for effectively zero cost, we should. Mark Randall