Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:47820 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 94808 invoked from network); 7 Apr 2010 12:35:42 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 7 Apr 2010 12:35:42 -0000 Authentication-Results: pb1.pair.com smtp.mail=tjerk.meesters@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=tjerk.meesters@gmail.com; sender-id=pass; domainkeys=bad Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.211.200 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: tjerk.meesters@gmail.com X-Host-Fingerprint: 209.85.211.200 mail-yw0-f200.google.com Received: from [209.85.211.200] ([209.85.211.200:65311] helo=mail-yw0-f200.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id FB/21-20534-C1C7CBB4 for ; Wed, 07 Apr 2010 08:35:40 -0400 Received: by ywh38 with SMTP id 38so535392ywh.29 for ; Wed, 07 Apr 2010 05:35:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:received:message-id:subject :from:to:content-type; bh=nPKYbL06KDAJWYcYNT8b/+NWf9qYB5RqO67DzECUhE8=; b=aiq8DnndjtE9Ihr6pVeJalWrUr2ZJvjNnnNYO5xEMunFUHvXiYNrjyS9nb7b9vDqP+ h5C0fGuDchSsPvP0P71mPyolvGxZNSpzCX+Mtnw4atRWS7YmU5+CzQHdsE92tXncsfXX AH+iq+rf8y/RBBplZdiuj7De40LDG1XnWPsO8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type; b=yIWcMhORtifaX2Lgr2vzg4iXUUMLZpJvABrwZGi21KYyfrOubuzZgJbPWfa8Ari7BQ DU3zpFxSJJgjEQJ4QZRUX/uTl31RyLnO5i3NZz0XUzKucJnoPHLYHNifESY+/5pcukkd 6izpner50D5FFfYr0WguEHnOMhHHcNTo973RE= MIME-Version: 1.0 Sender: tjerk.meesters@gmail.com Received: by 10.151.49.3 with HTTP; Wed, 7 Apr 2010 05:35:36 -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 20:35:36 +0800 X-Google-Sender-Auth: 1513eb18874abb0c Received: by 10.101.152.13 with SMTP id e13mr19380753ano.0.1270643736929; Wed, 07 Apr 2010 05:35:36 -0700 (PDT) Message-ID: To: Martin Jansen , Pierre Joye , Stanislav Malyshev , Hannes Magnusson , GM , internals@lists.php.net, Rasmus Lerdorf Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: [PHP-DEV] Named Parameters From: datibbaw@php.net (Tjerk Anne Meesters) In the case whereby names parameters are "plucked" from the argument list and passed as a hash to the function it really shouldn't matter whether that's invalid in python; both (2, 'name' => 'test') and ('name' => 'test', 2) would yield the same results, albeit it's a highly dubious way of passing arguments ;-) On 4/7/10, Martin Jansen wrote: > On 5.4.2010 00:45, Pierre Joye wrote: >> On Mon, Apr 5, 2010 at 12:07 AM, Stanislav Malyshev wrote: >> >>> 3. Combining named and un-named params can get weird - i.e. foo(1,2,3) is >>> simple, foo(1, 2, bar => 3) is doable, but foo(1, 2, bar => 3, 4) would >>> 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: Python does not allow using an unnamed > parameter after a named parameter occurred, i.e. foo(bar = 3, 2) is not > valid there. > > I would go as far as disallowing mixing of named and unnamed parameters > completely. But that's probably just me. > > - Martin > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > -- -- Tjerk