Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:34234 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 14905 invoked by uid 1010); 23 Dec 2007 20:52:20 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 14890 invoked from network); 23 Dec 2007 20:52:20 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 23 Dec 2007 20:52:20 -0000 Authentication-Results: pb1.pair.com header.from=malterisio777@gmail.com; sender-id=pass; domainkeys=bad Authentication-Results: pb1.pair.com smtp.mail=malterisio777@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.146.182 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: malterisio777@gmail.com X-Host-Fingerprint: 209.85.146.182 wa-out-1112.google.com Received: from [209.85.146.182] ([209.85.146.182:15472] helo=wa-out-1112.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 39/13-21654-38ACE674 for ; Sun, 23 Dec 2007 15:52:19 -0500 Received: by wa-out-1112.google.com with SMTP id l24so2294807waf.17 for ; Sun, 23 Dec 2007 12:52:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; bh=j0brGPZz7ZrTb7mbne3scnVK6oiFY7axEJLSiIPiYGU=; b=hfyWO2CTk47NOD/3FZMXnB9C20E+foiR8AomNVHrqggAjimloymB0KfZ715DL3yfjbz6iQG9cB0V9ECePh4Phz0o8jROenLkLOq9R6yjKuDGJGWQjEV41E7+WeLrL4VuviGd9i4f/96AnIZPbkeZwSV6y+iRWiH0TjfblTtygps= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=s+SRF7fbuBw+n7ycjhfnegF57iMq5th/NkSqWIKq64g56CShhjcQJFMhBhlxCSntz4vSiH5d/jT2ogHXTKdDeiDBJYDhq5Jxb81mkUSDQUWHCaQDnemFKb6RIVAEERNAbED8I2ZpCxdkIoGykvIoSV/H6wXy3mpwdIRWAvRpXcI= Received: by 10.142.131.18 with SMTP id e18mr1286149wfd.147.1198443136435; Sun, 23 Dec 2007 12:52:16 -0800 (PST) Received: by 10.142.157.9 with HTTP; Sun, 23 Dec 2007 12:52:16 -0800 (PST) Message-ID: <52dbac0f0712231252y3c7b1c64s2cde5c2f3992f808@mail.gmail.com> Date: Sun, 23 Dec 2007 17:52:16 -0300 To: "Christian Seiler" Cc: internals@lists.php.net In-Reply-To: <476D2854.5070803@gmx.net> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_5105_30468492.1198443136439" References: <98b8086f0712150818n40056cedyf0aae7a5a08a27b7@mail.gmail.com> <476582E6.7020808@zend.com> <200712172130.08216.larry@garfieldtech.com> <4FADC266-873E-4FD2-BEC8-28EA9D833297@procata.com> <476D2854.5070803@gmx.net> Subject: Re: [PHP-DEV] PATCH: Implementing closures in PHP (was: anonymous functions in PHP) From: malterisio777@gmail.com ("Martin Alterisio") ------=_Part_5105_30468492.1198443136439 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline 2007/12/22, Christian Seiler : > > Hi, > > I was following this thread and came upon Jeff's posting on how closures > could be implemented in PHP. > > Since I would find the feature to be EXTREMELY useful, I decided to > actually implement it more or less the way Jeff proposed. So, here's the > patch (against PHP_5_3, I can write one against HEAD if you whish): > > http://www.christian-seiler.de/temp/closures-php-5-3.patch > Hi, I finally got some time to check out your patch (the first and the second version). It looks cool, works as expected in most of the things I've tried. Nevertheless, I don't need this feature, it doesn't provide any advantage over the functor objects I've been using since long. Closures and anonymous functions are harder to maintain and debug, and they are not as elegant as their counterparts in functional languages (lambda functions). On the other side, functor objects are more maintainable, scalable, elegant, and versatile (and php already supports them... it could be improved though). Bottom line, excellent work. If a considerable part of the php user base need this, excellent, they have an implementation which seems viable. But, sorry, I couldn't care less about closures or anonymous functions. Anyway, my opinion doesn't matter, I'm just one user. Best Regards, Martin Alterisio ------=_Part_5105_30468492.1198443136439--