On Mon, May 17, 2021 at 6:36 PM Guilliam Xavier <guilliam.xav...@gmail.com> wrote:
> On Mon, May 17, 2021 at 5:01 PM Levi Morrison <levi.morri...@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 > Hey Guilliam, adding a special character like * or ? before the function name is not going to work. It might look good for *f() but it has the same issues as casting. You should be able to have with the current version a code like $actionGenerator->getDriveAction()('home', ?) You can't really put the * or ? before the function name here. Maybe having it just before the parenthesis would work. Regards, Alex