Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:38351 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 23820 invoked from network); 18 Jun 2008 15:05:33 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 18 Jun 2008 15:05:33 -0000 Authentication-Results: pb1.pair.com smtp.mail=stas@zend.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=stas@zend.com; 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:34432] helo=mx1.zend.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id D6/34-03518-C3429584 for ; Wed, 18 Jun 2008 11:05:33 -0400 Received: from us-ex1.zend.com ([192.168.16.5]) by mx1.zend.com with Microsoft SMTPSVC(6.0.3790.3959); Wed, 18 Jun 2008 18:05:36 +0300 Received: from [192.168.17.96] ([192.168.17.96]) by us-ex1.zend.com with Microsoft SMTPSVC(6.0.3790.3959); Wed, 18 Jun 2008 08:00:21 -0700 Message-ID: <485922F9.7070806@zend.com> Date: Wed, 18 Jun 2008 08:00:09 -0700 Organization: Zend Technologies User-Agent: Thunderbird 2.0.0.14 (Windows/20080421) MIME-Version: 1.0 To: Christian Seiler CC: Lars Strojny , Marcus Boerger , Johannes Schlueter , php-dev List References: <4856A547.3080801@gmx.net> <1961603263.20080617120320@marcus-boerger.de> <4857ACE1.3050501@gmx.net> <1178748433.20080617211038@marcus-boerger.de> <48580E5C.9090100@zend.com> <1213732325.21878.9.camel@localhost> <485821D6.7020604@gmx.net> In-Reply-To: <485821D6.7020604@gmx.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 18 Jun 2008 15:00:21.0484 (UTC) FILETIME=[0796CAC0:01C8D154] Subject: Re: [PHP-DEV] [PATCH] [RFC] Closures and lambda functions in PHP From: stas@zend.com (Stanislav Malyshev) Hi! > First: My patch is quite non-intrusive, it only adds things in a few > places (new opcode, a few checks). If you only look at the non-generated I think it falls into "famous last words" category. While I did not have time yet to look into the patch in the detail, I have hard time to believe patch creating wholly new concept in PHP, new opcodes, etc. would have zero impact. You have to consider at least the following: tests, documentation, how lexical interacts with other references (global? static? just variable passed by-ref?), how closure interacts with various reflection capabilities, how it works with bytecode caches, what happens with lifetimes of the variables saved in closures - especially implicit ones like $this, etc., etc. I know these questions can be answered, and maybe even easily answered, but I think they have to be answered without pressure of 5.3 release and commitment to the fixed API hanging over us. I understand your urge to have it inside ASAP - if you didn't want it, you'd not gone through this effort to create it :) However, I still think we better not make 5.3 dependent on yet another new feature. As for adoption - I think it would take a long time for off-the-shelf libraries and mainstream users to use this anyway, and for the hackers among us it will be available in development version pretty soon after 5.3. I think if we would decide that every new feature anybody can think about should enter into 5.3 because it will be harder to adopt it otherwise, we'd never release 5.3 at all - look at the RFCs, we have a bunch of ideas already, and I'm sure there will be more. We need to release some time - what happened to that "release often" thing? Please do not consider this to be opinion about (or against) the patch - I think the idea is good and from preliminary glance the implementation is very nice too, but IMHO we just can not have everything in one release. -- Stanislav Malyshev, Zend Software Architect stas@zend.com http://www.zend.com/ (408)253-8829 MSN: stas@zend.com