Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:21511 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 63001 invoked by uid 1010); 13 Jan 2006 12:16:49 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 62986 invoked from network); 13 Jan 2006 12:16:49 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 13 Jan 2006 12:16:49 -0000 X-Host-Fingerprint: 212.112.227.169 ipx11223.ipxserver.de Linux 2.5 (sometimes 2.4) (4) Received: from ([212.112.227.169:40425] helo=ipx11223.ipxserver.de) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id 22/DC-25674-13A97C34 for ; Fri, 13 Jan 2006 07:16:49 -0500 Received: from localhost (localhost [127.0.0.1]) by ipx11223.ipxserver.de (Postfix) with ESMTP id A961DDF011A; Fri, 13 Jan 2006 13:16:47 +0100 (CET) Received: from ipx11223.ipxserver.de ([127.0.0.1]) by localhost (ipx11223 [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 13784-01; Fri, 13 Jan 2006 13:16:37 +0100 (CET) Received: from [127.0.0.1] (i577B73E4.versanet.de [87.123.115.228]) by ipx11223.ipxserver.de (Postfix) with ESMTP id CCBDFDF010F; Fri, 13 Jan 2006 13:16:36 +0100 (CET) Message-ID: <43C79A23.6010701@php.net> Date: Fri, 13 Jan 2006 13:16:35 +0100 User-Agent: Thunderbird 1.5 (Windows/20051201) MIME-Version: 1.0 To: Hartmut Holzgraefe Cc: internals@lists.php.net References: <43C67431.9090003@prohost.org><3A366ACB-20D4-42C7-BBAE-46F643E3A91F@intuitivefuture.com><878581203.20060112153625@ionzoft.com> <7.0.0.16.2.20060112154219.029d06c8@zend.com><43C75FEE.7040908@php.net> <6C.F4.25674.EFD67C34@pb1.pair.com> <43C786E5.1020400@mysql.com> <43C7975A.2070504@php.net> <43C79801.7070101@mysql.com> In-Reply-To: <43C79801.7070101@mysql.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by somedaemon at backendmedia.com Subject: Re: [PHP-DEV] Re: Named arguments revisited From: lsmith@php.net (Lukas Smith) 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