Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:18003 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 35842 invoked by uid 1010); 13 Aug 2005 22:06:55 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 35827 invoked from network); 13 Aug 2005 22:06:55 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 13 Aug 2005 22:06:55 -0000 X-Host-Fingerprint: 66.80.117.3 longsword.omniti.com Linux 2.5 (sometimes 2.4) (4) Received: from ([66.80.117.3:59648] helo=mail.omniti.com) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id 67/0A-33075-EFE6EF24 for ; Sat, 13 Aug 2005 18:06:55 -0400 Authentication-Results: mail.omniti.com smtp.user=george; auth=pass (LOGIN) DomainKey-Status: good X-DomainKeys: Ecelerity dk_sign implementing draft-delany-domainkeys-base-01 DomainKey-Signature: q=dns; a=rsa-sha1; c=nofws; s=test; d=omniti.com; h=Received:In-Reply-To:References:Mime-Version:Content-Type:Message-Id:Cc:From:Subject:Date:To:X-Mailer; b=V+4JNAeWmubfPOKZ/jue/OYIXu4Q4B81jjPPVXGVD4hMCXjSHDY16XT8egCBhbw7 gqYcVsD0ZROW5qCA7177NqT23AqL1bjoqGeKS3CQLPcqIB2fjhlAYWfp/iDTOGds Received: from ([66.80.117.2:49202] helo=[192.168.219.134]) by mail.omniti.com (ecelerity 2.0 r(6416M)) with SMTP id 37/30-29456-7FE6EF24 for ; Sat, 13 Aug 2005 18:06:51 -0400 In-Reply-To: <42FE6CC4.8080705@hristov.com> References: <42FCE0E4.604@lerdorf.com> <42FDDF11.2050308@cschneid.com> <6E8568FA-5893-476A-A88F-E5504C638F37@omniti.com> <42FE6AE7.1040405@hristov.com> <210C80B1-DFA3-40C9-A1A0-D8E5EE6AAAD9@omniti.com> <42FE6CC4.8080705@hristov.com> Mime-Version: 1.0 (Apple Message framework v733) Content-Type: multipart/alternative; boundary=Apple-Mail-37--365284120 Message-ID: <4299A67D-9247-45E5-9696-E99AE13D0492@omniti.com> Cc: George Schlossnagle , internals@lists.php.net Date: Sat, 13 Aug 2005 18:06:43 -0400 To: Andrey Hristov X-Mailer: Apple Mail (2.733) Subject: Re: [PHP-DEV] Re: PHP 6.0 Wishlist From: george@omniti.com (George Schlossnagle) --Apple-Mail-37--365284120 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed On Aug 13, 2005, at 5:57 PM, Andrey Hristov wrote: > George Schlossnagle wrote: > >> On Aug 13, 2005, at 5:49 PM, Andrey Hristov wrote: >> >>> George Schlossnagle wrote: >>> >>> >>>> On Aug 13, 2005, at 11:46 AM, Matthew Weier O'Phinney wrote: >>>> >>>> >>>>> * Christian Schneider : >>>>> >>>>> >>>>> >>>>>> 9. Named parameters. Preferred way would be via array()-less >>>>>> array >>>>>> collation as we are already using this in our production >>>>>> system ;-) : >>>>>> foo('id' => 42, 'name' => "foo"); >>>>>> >>>>>> >>>>>> >>>>> >>>>> +1 -- this is one of the biggest things I miss coming from >>>>> perl to PHP. >>>>> >>>>> >>>> Huh? Perl doesn't have true support for this anyway, just a >>>> simpler syntax for hashrefs. If you want Perlish named params >>>> this is 100% identical to doing >>>> foo(array('id' => 42, 'name' => 'foo')); >>>> George >>>> >>>> >>> >>> Well, this idea I think comes from Python. Last time I checked >>> they had these >>> and as far as I remember this have been brought 2 times. The >>> first time before >>> 5.0 and has been rescheduled for 6.0 :) >>> >> :) >> I'm not against named parameters. Python's support for them is >> nice as well. But Perl doesn't support named parameters any >> different than can be done currently in PHP. >> George >> > > I could be wrong, but I think you were the one who first wanted > named parameters > that long time ago :) Possibly, which would fall inline with not being against them now. :) I like them in Python. The ones in Perl are a hack, though, with limitations on how they can be positioned, lack of prototyping and default values, etc. The Python ones are much more flexible, imho. The only difference between Perl's support for named params and PHP's current support is that in Perl: foo( a => 1, b => 2) is the same as foo((a => 1, b => 2)), i.e. that you have in Perl: (a => 1, b => 2) whereas in PHP we have array('a' => 1, 'b' => 2); > > Andrey > George Schlossnagle -- Vice President of Engineering -- OmniTI Computer Consulting -- http://www.omniti.com --Apple-Mail-37--365284120--