>In order to use named parameters, somebody needs to have declared what
those names are, and made them a stable API. If they're automatically
supported on existing functions, the author might not intend them to be
used, or even realise they can, so not keep them stable (I tend to think of
parameter names as local, not contractual).

Wouldn't using the name of the variable that is already used for its
function signature work perfectly fine for this?
This is how IDEs already hint for function call completion.

On Sun, Apr 7, 2019 at 6:26 AM Rowan Collins <rowan.coll...@gmail.com>
wrote:

> On 7 April 2019 06:00:53 BST, CHU Zhaowei <m...@jhdxr.com> wrote:
> >The [named parameters](https://wiki.php.net/rfc/named_params) was
> >proposed in 2013. Does the problems which stopped us before still exist
> >in 2019? Since we all agree named parameter should be a better
> >solution, why not take a look at it first?
>
> I'm not 100% convinced named parameters are the solution to this problem,
> in all cases.
>
> In order to use named parameters, somebody needs to have declared what
> those names are, and made them a stable API. If they're automatically
> supported on existing functions, the author might not intend them to be
> used, or even realise they can, so not keep them stable (I tend to think of
> parameter names as local, not contractual).
>
> To use a default-skipping keyword, you need no extra promise than that
> already made, namely that the default for any parameter is a valid value
> for that parameter.
>
> Regards,
>
> --
> Rowan Collins
> [IMSoP]
>
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

Reply via email to