Re: [RFC] Partial Function Application, take 2
| From: | Björn Larsson | Date: | Mon, 07 Jun 2021 19:50:28 +0000 |
| Subject: | Re: [RFC] Partial Function Application, take 2 | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-114772@lists.php.net to get a copy of this message | ||
Den 2021-06-02 kl. 22:16, skrev Mike Schinkel:
I second this opinion. So is the "...?" syntax something that will be considered? r//Björn LarssonOn Jun 2, 2021, at 1:45 PM, Larry Garfield <larry@garfieldtech.com> wrote: Hi folks. After much off-list discussion, iteration, and consideration, we have a new draft of PFA ready for review. The URL is the same: https://wiki.php.net/rfc/partial_function_applicationReally excellent work, all!It's a bit long because we wanted to be as precise as possible. However, in short: * Partial application creates a closure object you can use like any other. * A ? indicates "exactly one required parameter here" * A ... indicates "zero or more parameters here"My only comment/request/suggestion is to consider Mark Randall's suggestion to use...?instead, for the reasons he mentioned in his email to the list: https://externals.io/message/114157#114666 <https://externals.io/message/114157#114666> Plus Levi Morrison seemed to approve: https://externals.io/message/114157#114667 <https://externals.io/message/114157#114667> -Mike