Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:21482 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 61256 invoked by uid 1010); 12 Jan 2006 07:18:51 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 61241 invoked from network); 12 Jan 2006 07:18:51 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 12 Jan 2006 07:18:51 -0000 X-Host-Fingerprint: 212.112.227.169 ipx11223.ipxserver.de Linux 2.5 (sometimes 2.4) (4) Received: from ([212.112.227.169:53898] helo=ipx11223.ipxserver.de) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id 32/16-29075-BD206C34 for ; Thu, 12 Jan 2006 02:18:51 -0500 Received: from localhost (localhost [127.0.0.1]) by ipx11223.ipxserver.de (Postfix) with ESMTP id 3C498DF00CC; Thu, 12 Jan 2006 08:18:48 +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 17996-10; Thu, 12 Jan 2006 08:18:37 +0100 (CET) Received: from [127.0.0.1] (i577B582E.versanet.de [87.123.88.46]) by ipx11223.ipxserver.de (Postfix) with ESMTP id 4708BDF0085; Thu, 12 Jan 2006 08:18:37 +0100 (CET) Message-ID: <43C602CB.2030702@php.net> Date: Thu, 12 Jan 2006 08:18:35 +0100 User-Agent: Thunderbird 1.5 (Windows/20051201) MIME-Version: 1.0 To: Andrei Zmievski Cc: Aidan Lister , internals@lists.php.net References: In-Reply-To: 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) Andrei Zmievski wrote: > If you get to the point where your function has a dozen parameters, I > would suggest re-thinking the purpose and design of such a function, > because you are likely trying to make it do too much. Obviously for most methods you should not require more than say 5 parameters. But there are the extremes .. say a query builder and you dont want to use a fluent interface ;-) Sometimes you can come up with a very concise method that proxies calls to other methods and therefore needs quite a ton of (often optional) parameters. Obviously you can use arrays and things like that to not force the user to remember the exact parameter order, but it means adding alot of code for managing defaults and incorrect parameters. regards, Lukas