Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:38700 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 38663 invoked from network); 2 Jul 2008 11:49:09 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 2 Jul 2008 11:49:09 -0000 Authentication-Results: pb1.pair.com header.from=chris_se@gmx.net; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=chris_se@gmx.net; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmx.net designates 213.165.64.20 as permitted sender) X-PHP-List-Original-Sender: chris_se@gmx.net X-Host-Fingerprint: 213.165.64.20 mail.gmx.net Received: from [213.165.64.20] ([213.165.64.20:52540] helo=mail.gmx.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 9F/10-37564-33B6B684 for ; Wed, 02 Jul 2008 07:49:09 -0400 Received: (qmail invoked by alias); 02 Jul 2008 11:42:23 -0000 Received: from p54A16BBD.dip.t-dialin.net (EHLO chris-se.dyndns.org) [84.161.107.189] by mail.gmx.net (mp047) with SMTP; 02 Jul 2008 13:42:23 +0200 X-Authenticated: #186999 X-Provags-ID: V01U2FsdGVkX18pS0h+Spkpz40uJjo8NZHW6ZWYJbIfqyps44cyDQ vtpY+kjZznZcHy Received: from [141.3.163.98] (vpn-cl-163-98.rz.uni-karlsruhe.de [141.3.163.98]) by chris-se.dyndns.org (Postfix) with ESMTP id A4D4D19446 for ; Wed, 2 Jul 2008 13:23:27 +0200 (CEST) Message-ID: <486B6960.4030705@gmx.net> Date: Wed, 02 Jul 2008 13:41:20 +0200 User-Agent: Thunderbird 2.0.0.14 (X11/20080421) MIME-Version: 1.0 To: php-dev List X-Enigmail-Version: 0.95.6 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-FuHaFi: 0.67 Subject: [RFC] Closures: updated proposal and patch From: chris_se@gmx.net (Christian Seiler) Hi, After some discussion with Dmitry, he and I have continued to improve the current closure patch. You can find the current proposal with patches for 5_3 and HEAD here: http://wiki.php.net/rfc/closures (Please read it again, I've changed quite a lot.) Basically, it's the syntax with use ($lexical) in the function declaration, optional references, optional static keyword for functions that don't need $this and support for __invoke. I know that there was some disagreement on the syntax (including by me) but I think this is the best compromise we can achieve while still staying consistent with PHPs current semantics and not breaking BC at all. I've spoken to Dmitry and he said the patch will be committed to HEAD soon. Since both Dmitry and I still want to have it in 5_3 too, we'd want to ask for opinions on this again - especially since after quite a lot of thorough review and discussion on this list basically all the side-effects have been addressed and there are now quite a few tests that ensure the correct behaviour of closures. Also, the patch is now built in a way that the main functionality remains inside zend_closures.c, so any possible not yet encountered bug can be fixed without breaking binary compability. Regards, Christian