Re: [RFC] Partial function application
| From: | Guilliam Xavier | Date: | Mon, 17 May 2021 15:36:24 +0000 |
| Subject: | Re: [RFC] Partial function application | ||
| References: | 1 2 3 4 5 6 7 8 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-114504@lists.php.net to get a copy of this message | ||
On Mon, May 17, 2021 at 5:01 PM Levi Morrison <levi.morrison@datadoghq.com>
wrote:
> Joe Watkins has successfully worked out some bugs that also enable
> more powerful behavior. Thanks to Nikita and any others who worked
> with Joe on fixing these issues and reviewing the PR.
>
> The short of it is that re-ordering parameters when using named
> placeholders is now technically possible. We will send an update when
> the RFC and implementation are ready for re-review.
>
That's great news!
By the way, I forgot to add that another syntax might also be clearer when
binding a value to a named parameter, e.g.:
```
function f($a, $b, $c, $d, $e) {/*...*/}
/* We want to bind value 4 to param "d" */
// with current syntax:
$p = f(?, d: 4); /* or f(?, ?, ?, 4) */
// with another hypothetical syntax:
$p = *f(d: 4);
```
Anyway, looking forward to your update =)
Thanks,
--
Guilliam Xavier