Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:47819 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 76886 invoked from network); 7 Apr 2010 09:00:11 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 7 Apr 2010 09:00:11 -0000 Authentication-Results: pb1.pair.com smtp.mail=pierre.php@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=pierre.php@gmail.com; sender-id=pass; domainkeys=bad Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.160.170 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: pierre.php@gmail.com X-Host-Fingerprint: 209.85.160.170 mail-gy0-f170.google.com Received: from [209.85.160.170] ([209.85.160.170:44561] helo=mail-gy0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id A7/00-10852-5994CBB4 for ; Wed, 07 Apr 2010 05:00:09 -0400 Received: by gyf2 with SMTP id 2so487666gyf.29 for ; Wed, 07 Apr 2010 01:59:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:received:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=cT09Y+c+cWPlSfIBsNn6QJZuUjwJCIZJFnfFaLIL/74=; b=S2TODT48XAZVI0lM+WOQgNkUOPUAmCHSwfoWr2T4Oy7TezM3qGNYwOxjV3OfxB3mYf dq03f3Dc2GegsU0PBcbWkvYmprGgwHHl8jb763mX6Y+sMvaLrczO+5HHHJTzeVEQcXPi VgiYBLfaFieCgmUaEQVnot7BvVR79IfoyUNcg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=YueA1ehoEo72wMc2hqAdbtjmNk2qJM1Q6BlVa7YN4vKj2aBSRxIpmjA7OIhEbXhxtJ 8PV37hbAqtqkUTN01Kg29zRWL2iwpl5rIzBzJbSSRQ/2UpLGbXOnZuXVPYraFtK35xsw su0yy8AOBKU4QnDTCfRNNGN354dPyfZ+AUxZ4= MIME-Version: 1.0 Received: by 10.100.138.8 with HTTP; Wed, 7 Apr 2010 01:59:58 -0700 (PDT) In-Reply-To: <4BBC25DD.7060604@divbyzero.net> References: <745C5243-EB51-4D43-B036-8A34CDBBB547@gregory.net> <4BB68D61.2070301@lerdorf.com> <4BB6938F.7090404@zend.com> <4BB90DB7.6060706@zend.com> <4BBC25DD.7060604@divbyzero.net> Date: Wed, 7 Apr 2010 10:59:58 +0200 Received: by 10.101.143.12 with SMTP id v12mr18888298ann.88.1270630798892; Wed, 07 Apr 2010 01:59:58 -0700 (PDT) Message-ID: To: Martin Jansen Cc: Stanislav Malyshev , Hannes Magnusson , GM , internals@lists.php.net, Rasmus Lerdorf Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] Named Parameters From: pierre.php@gmail.com (Pierre Joye) On Wed, Apr 7, 2010 at 8:27 AM, Martin Jansen wrote: > On 5.4.2010 00:45, Pierre Joye wrote: >> On Mon, Apr 5, 2010 at 12:07 AM, Stanislav Malyshev wrot= e: >> >>> 3. Combining named and un-named params can get weird - i.e. foo(1,2,3) = is >>> simple, foo(1, 2, bar =3D> 3) is doable, but foo(1, 2, bar =3D> 3, 4) w= ould be >>> trouble, since it is not clear at all where 4 should go to. Moreover, >> >> If we introduce named argument, mixing them should not be weird. An >> argument can have both a name and a position, allowing combination of >> normal or named arguments. Python's way to do it is very nice and >> handy: >> >> http://diveintopython.org/power_of_introspection/optional_arguments.html > > Just to be clear about this: =A0Python does not allow using an unnamed > parameter after a named parameter occurred, i.e. foo(bar =3D 3, 2) is not > valid there. Right, the doc is clear about that and makes the whole thing less confusing= . > I would go as far as disallowing mixing of named and unnamed parameters > completely. =A0But that's probably just me. That would defeat the main purposes of named arguments. Cheers, --=20 Pierre @pierrejoye | http://blog.thepimp.net | http://www.libgd.org