Re: Re: Named arguments revisited
| From: | Lukas Smith | Date: | Fri, 13 Jan 2006 12:16:35 +0000 |
| Subject: | Re: Re: Named arguments revisited | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 12 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-21511@lists.php.net to get a copy of this message | ||
Hartmut Holzgraefe wrote:
Lukas Smith wrote: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, Lukasdo we really want to add even more inconsistencies to the language?- all internal and PECL functions need to be recoded as the API right now doesn't know any concept of parameter names at allI was thinking that this would a userland only feature.