Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:28466 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 66709 invoked by uid 1010); 19 Mar 2007 22:26:25 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 66694 invoked from network); 19 Mar 2007 22:26:25 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Mar 2007 22:26:25 -0000 Authentication-Results: pb1.pair.com smtp.mail=ceo@l-i-e.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=ceo@l-i-e.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain l-i-e.com from 67.139.134.202 cause and error) X-PHP-List-Original-Sender: ceo@l-i-e.com X-Host-Fingerprint: 67.139.134.202 o2.hostbaby.com FreeBSD 4.7-5.2 (or MacOS X 10.2-10.3) (2) Received: from [67.139.134.202] ([67.139.134.202:3741] helo=o2.hostbaby.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id D0/18-01604-F0E0FF54 for ; Mon, 19 Mar 2007 17:26:25 -0500 Received: (qmail 6301 invoked by uid 98); 19 Mar 2007 22:26:25 -0000 Received: from 127.0.0.1 by o2.hostbaby.com (envelope-from , uid 1013) with qmail-scanner-1.25 (clamdscan: 0.88.7/2871. Clear:RC:1(127.0.0.1):. Processed in 0.077188 secs); 19 Mar 2007 22:26:25 -0000 X-Qmail-Scanner-Mail-From: ceo@l-i-e.com via o2.hostbaby.com X-Qmail-Scanner: 1.25 (Clear:RC:1(127.0.0.1):. Processed in 0.077188 secs) Received: from localhost (HELO l-i-e.com) (127.0.0.1) by localhost with SMTP; 19 Mar 2007 22:26:25 -0000 Received: from 216.230.84.67 (SquirrelMail authenticated user ceo@l-i-e.com) by www.l-i-e.com with HTTP; Mon, 19 Mar 2007 17:26:25 -0500 (CDT) Message-ID: <41955.216.230.84.67.1174343185.squirrel@www.l-i-e.com> In-Reply-To: <45FF06B4.2060801@zend.com> 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> <45FF06B4.2060801@zend.com> Date: Mon, 19 Mar 2007 17:26:25 -0500 (CDT) To: "Stanislav Malyshev" Cc: "Wez Furlong" , "Sean Coates" , internals@lists.php.net Reply-To: ceo@l-i-e.com User-Agent: Hostbaby Webmail MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal Subject: Re: [PHP-DEV] PATCH: anonymous functions in PHP From: ceo@l-i-e.com ("Richard Lynch") On Mon, March 19, 2007 4:55 pm, Stanislav Malyshev wrote: >> You have to have a pretty esoteric function to need that kind of >> scope >> control, no? > > Depends on your background. Some people consider LISP intuitive > language > :) And if you work with Javascript, you probably would be doing it > daily > - most AJAX toolkits rely on heavy usage of anonymous functions. Not > sure it needs to be in PHP though. It might be cool thing, but it's > definitely becomes very confusing very fast. I almost finished my MS in CS with Artificial Intelligence concentration at DePaul, so I *was* one of those CS students with too much time on my hands. Then I worked at an AI think tank lab at Northwestern University for most of a decade using Lisp. I gotta say that while it was Really Nifty to know all about those esoteric closures, curries, and whatnot I have since forgot, mostly, I didn't need these things on a daily basis even at that job. So, yes, somebody somewhere "needs" this, but is it the kind of thing that belongs in PHP? I think not. By "this" I mean the ability to have the lexical closure carry its scope around with itself. I *WANT* to have a simple clean anonymous function syntax. Can't you just take the body of "create_function" with the syntax of the patch, and marry those two? How does the current create_function handle this same scope issue? -- Some people have a "gift" link here. Know what I want? I want you to buy a CD from some starving artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So?