Hartmut Holzgraefe wrote:
Lukas Smith wrote:
- all internal and PECL functions need to be recoded as the API
right now doesn't know any concept of parameter names at all
I was thinking that this would a userland only feature.
do we really want to add even more inconsistencies to the language?
Its a choice you make when you define your signature and you always need
to check the signature before you call a function using named parameters
to know the names of the parameters.
Adding this to functions that do not fall into the category of having 5+
parameters, especially internal ones, would indeed be a horror scenario.
I would therefore even suggest to make it a binary choice. As in the
function does either named parameters or by order.
Its sole purpose is to deal with situations where you have a
considerable number of parameters. I am not aware of internal functions
that fit this criteria. I am not sure if we need to forbid internal
functions to use named parameters (as long as its a binary choice). But
if we keep it binary I do not see it adding confusion. Its certainly
less confusing than having to use some array format that is hard to
document properly.
regards,
Lukas
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php