Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:34156 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 35414 invoked by uid 1010); 20 Dec 2007 18:06:52 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 35398 invoked from network); 20 Dec 2007 18:06:51 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 20 Dec 2007 18:06:51 -0000 Authentication-Results: pb1.pair.com header.from=stas@zend.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=stas@zend.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zend.com designates 212.25.124.162 as permitted sender) X-PHP-List-Original-Sender: stas@zend.com X-Host-Fingerprint: 212.25.124.162 mail.zend.com Windows 2000 SP4, XP SP1 Received: from [212.25.124.162] ([212.25.124.162:39667] helo=mx1.zend.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 3F/92-19413-A3FAA674 for ; Thu, 20 Dec 2007 13:06:51 -0500 Received: from us-ex1.zend.com ([192.168.16.5]) by mx1.zend.com with Microsoft SMTPSVC(6.0.3790.3959); Thu, 20 Dec 2007 20:06:43 +0200 Received: from [192.168.16.91] ([192.168.16.91]) by us-ex1.zend.com with Microsoft SMTPSVC(6.0.3790.1830); Thu, 20 Dec 2007 10:06:40 -0800 Message-ID: <476AAF31.5020009@zend.com> Date: Thu, 20 Dec 2007 10:06:41 -0800 Organization: Zend Technologies User-Agent: Thunderbird 2.0.0.9 (Windows/20071031) MIME-Version: 1.0 To: RQuadling@GoogleMail.com CC: Alexey Zakhlestin , troels knak-nielsen , internals@lists.php.net References: <98b8086f0712150818n40056cedyf0aae7a5a08a27b7@mail.gmail.com> <200712172130.08216.larry@garfieldtech.com> <4FADC266-873E-4FD2-BEC8-28EA9D833297@procata.com> <200712172341.54372.larry@garfieldtech.com> <98b8086f0712191345h7fe11a7kc5d34b0369754c8f@mail.gmail.com> <47699960.1090101@zend.com> <98b8086f0712191528n2fd348d0oe3da9eed20d87194@mail.gmail.com> <4769ACF5.7000701@zend.com> <10845a340712200143k1b83db1bufbb1462aceb439c9@mail.gmail.com> In-Reply-To: <10845a340712200143k1b83db1bufbb1462aceb439c9@mail.gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 20 Dec 2007 18:06:40.0595 (UTC) FILETIME=[12170230:01C84333] Subject: Re: [PHP-DEV] Re: PATCH: anonymous functions in PHP From: stas@zend.com (Stanislav Malyshev) > That makes perfect sense to me as I see/use this sort of code in JavaScript. Well, PHP is not Javascript - and BTW Javascript is a complex language and I don't think we should import that complexity into PHP. > The argument about making the filter a global function is not sensible > to apply in all circumstances. In many cases the filter is only going > to be of use in an array_filter() call, so now we would have 2 > functions to do the work of 1. No, we won't - both cases have only one function, if you don't count array_filter(), and two, if you do. > Maybe a syntax like this would be more appealing ... > > array_filter($my_data as $test) { > return 4 === ($test % 4); > } No, it won't be. If you are looking for Scheme or Ruby, you know where to find it :) -- Stanislav Malyshev, Zend Software Architect stas@zend.com http://www.zend.com/ (408)253-8829 MSN: stas@zend.com