Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:28501 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 42002 invoked by uid 1010); 20 Mar 2007 22:40:07 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 41987 invoked from network); 20 Mar 2007 22:40:07 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 20 Mar 2007 22:40:07 -0000 Authentication-Results: pb1.pair.com smtp.mail=dz@bitxtender.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=dz@bitxtender.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain bitxtender.com from 80.237.132.12 cause and error) X-PHP-List-Original-Sender: dz@bitxtender.com X-Host-Fingerprint: 80.237.132.12 wp005.webpack.hosteurope.de Received: from [80.237.132.12] ([80.237.132.12:41710] helo=wp005.webpack.hosteurope.de) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id F3/DC-21779-6C260064 for ; Tue, 20 Mar 2007 17:40:06 -0500 Received: from dslb-084-056-056-156.pools.arcor-ip.net ([84.56.56.156] helo=[192.168.0.100]); authenticated by wp005.webpack.hosteurope.de running ExIM using esmtpa id 1HTmzr-00033m-CW; Tue, 20 Mar 2007 23:40:03 +0100 In-Reply-To: References: <86478A67-DCA2-4000-9EF0-DA4338E8389B@omniti.com> <54922.216.230.84.67.1174335655.squirrel@www.l-i-e.com> <1174336517.24632.111.camel@blobule> <45474.216.230.84.67.1174337937.squirrel@www.l-i-e.com> Mime-Version: 1.0 (Apple Message framework v752.2) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-ID: <53F7E9D8-10B2-42A4-B21C-90AC5548B8E1@bitxtender.com> Cc: internals@lists.php.net Content-Transfer-Encoding: 7bit Date: Tue, 20 Mar 2007 23:40:02 +0100 To: Daniel Rozsnyo X-Mailer: Apple Mail (2.752.2) X-bounce-key: webpack.hosteurope.de;dz@bitxtender.com;1174430406;5959683a; Subject: Re: [PHP-DEV] PATCH: anonymous functions in PHP From: dz@bitxtender.com (=?ISO-8859-1?Q?David_Z=FClke?=) Am 20.03.2007 um 15:24 schrieb Daniel Rozsnyo: >>> A function with a name is no longer anonymous ;) >> I am not suggesting that there be a name. >> I am suggesting that the reserved keyword for an anonymous function >> should not be 'function', the same as a normal function. > > I don't have anything against 'function', I think JS uses the same > syntax - function without a name. If you change it to something > different, e.g 'callback', then you loose the information that it > is actually a function > > $error_func = callback($msg) { > file_put_contents('php://stderr',"Error: $msg\n"); > } > > vs. > > $error_func = function($msg) { > file_put_contents('php://stderr',"Error: $msg\n"); > } > > The second one looks better for me. what about "lambda", like in Python? David