Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:21479 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 73608 invoked by uid 1010); 12 Jan 2006 00:21:20 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 73593 invoked from network); 12 Jan 2006 00:21:20 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 12 Jan 2006 00:21:20 -0000 X-Host-Fingerprint: 216.145.54.171 mrout1.yahoo.com FreeBSD 4.7-5.2 (or MacOS X 10.2-10.3) (2) Received: from ([216.145.54.171:32271] helo=mrout1.yahoo.com) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id 18/AE-29075-FF0A5C34 for ; Wed, 11 Jan 2006 19:21:20 -0500 Received: from [66.228.175.145] (borndress-lm.corp.yahoo.com [66.228.175.145]) by mrout1.yahoo.com (8.13.4/8.13.4/y.out) with ESMTP id k0C0Ihux084011; Wed, 11 Jan 2006 16:18:43 -0800 (PST) In-Reply-To: References: Mime-Version: 1.0 (Apple Message framework v623) Content-Type: text/plain; charset=US-ASCII; format=flowed Message-ID: Content-Transfer-Encoding: 7bit Cc: internals@lists.php.net Date: Wed, 11 Jan 2006 16:19:45 -0800 To: Aidan Lister X-Mailer: Apple Mail (2.623) Subject: Re: [PHP-DEV] Re: Named arguments revisited From: andrei@gravitonic.com (Andrei Zmievski) On Jan 9, 2006, at 4:09 AM, Aidan Lister wrote: > As useful functions tend to increase in complexity over time, often so > does the number of parameters. > > It soon gets to the point where function calls look like: > foo(true, false, false, false, false, true) > The rest of the parameters being required to be supplied, with their > default value, when the user is only interested in changing the last > option. > 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. -Andrei