Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:28480 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 1907 invoked by uid 1010); 20 Mar 2007 13:28:06 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 1892 invoked from network); 20 Mar 2007 13:28:05 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 20 Mar 2007 13:28:05 -0000 Authentication-Results: pb1.pair.com header.from=chad@herballure.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=chad@herballure.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain herballure.com from 64.202.189.89 cause and error) X-PHP-List-Original-Sender: chad@herballure.com X-Host-Fingerprint: 64.202.189.89 k2smtpout01-02.prod.mesa1.secureserver.net Linux 2.4/2.6 Received: from [64.202.189.89] ([64.202.189.89:46638] helo=k2smtpout01-02.prod.mesa1.secureserver.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id F8/64-61497-461EFF54 for ; Tue, 20 Mar 2007 08:28:05 -0500 Received: (qmail 7870 invoked from network); 20 Mar 2007 13:28:01 -0000 Received: from unknown (HELO secureservicesonline.com) (68.178.174.117) by k2smtpout01-02.prod.mesa1.secureserver.net (64.202.189.89) with ESMTP; 20 Mar 2007 13:28:01 -0000 Received: from [192.168.0.50] (cpe-69-205-153-76.stny.res.rr.com [69.205.153.76]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by secureservicesonline.com (Postfix) with ESMTP id 421036D0211 for ; Tue, 20 Mar 2007 09:28:00 -0400 (EDT) Message-ID: <45FFE15F.4030300@herballure.com> Date: Tue, 20 Mar 2007 09:27:59 -0400 User-Agent: Thunderbird 1.5.0.10 (X11/20070221) MIME-Version: 1.0 To: internals@lists.php.net References: <86478A67-DCA2-4000-9EF0-DA4338E8389B@omniti.com> <45FDF031.4010508@zend.com> <45FE2312.1050506@zend.com> <45FED6D9.8030307@caedmon.net> <45FEDAE5.2010309@zend.com> <45FEE396.7040905@caedmon.net> <0757BDEA-65F5-4123-B647-060DCA84B4B0@omniti.com> <32945.216.230.84.67.1174340098.squirrel@www.l-i-e.com> In-Reply-To: <32945.216.230.84.67.1174340098.squirrel@www.l-i-e.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] PATCH: anonymous functions in PHP From: chad@herballure.com (Chad Daelhousen) Richard Lynch wrote: > I suspect that you could get away with JUST using global and/or static > as they exist now, not introduce yet another scoping keyword, and > anything that *NEEDS* to be done with an anonymous function can be > done. > > Does anybody really *NEED* a variable whose scope is non-global and > captured at the time of the func definition, carried over beyond the > scope of that until it's executed?... > > Somehow I think you're just complicating it "because you can" rather > than because anybody really NEEDS this. Objects provide for functions with state (methods and properties), in a way that doesn't cause headaches with scoping. So although I would love the convenience of closures in certain places, I can't argue that there is a NEED for them. -- Chad Daelhousen I've been programming for about 15 years, but it's only in the last couple that I've come to a real understanding of it all.