Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:18298 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 11825 invoked by uid 1010); 23 Aug 2005 10:11:23 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 11810 invoked from network); 23 Aug 2005 10:11:23 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 23 Aug 2005 10:11:23 -0000 X-Host-Fingerprint: 80.74.107.235 mail.zend.com Linux 2.5 (sometimes 2.4) (4) Received: from ([80.74.107.235:59954] helo=mail.zend.com) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id 3E/6A-28235-A46FA034 for ; Tue, 23 Aug 2005 06:11:23 -0400 Received: (qmail 20758 invoked from network); 23 Aug 2005 10:11:18 -0000 Received: from shire.zend.office (10.1.2.160) by internal.zend.office with SMTP; 23 Aug 2005 10:11:18 -0000 Date: Tue, 23 Aug 2005 13:11:18 +0300 (IDT) X-X-Sender: frodo@shire.zend.office To: George Schlossnagle cc: internals@lists.php.net In-Reply-To: Message-ID: References: <42FCE0E4.604@lerdorf.com> <4309DC9B.8020904@peda.net> <19310545471.20050822200017@marcus-boerger.de> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: Re: [PHP-DEV] Re: PHP 6.0 Wishlist From: stas@zend.com (Stanislav Malyshev) GS>>1) syntactical: the amount of escaping/funkyjunk you need to do to GS>>have anonymous functions look like regular functions in their GS>>declaration is huge (yes, you can use heredocs, but they have their GS>>(big if you run up against them) limitations as well). Well, this is right and valid, but if you use advanced stuff like closures you may expect you code look "advanced" :) GS>>2) no garbage collection on them (so in something like perl, when you GS>>anonymous sub goes out of scope, it's cleaned up). This is a valid concern, though I don't see how to fix it without creating a new type, and creating anew type just for that seems a bit of overkill to me. GS>>3) runtime vs. compiletime definition GS>> GS>>For me 3 is good the way it is (the whole point of anon. functions (for me) GS>>is to allow me to easily vary their definition at runtime). This one I miss. Like, why should it matter when you compile it? Compilation time is still the same. Even more, in runtime you don't spend time compiling it unless it's really needed. GS>>$max = function ($a, $b) { GS>> return $a < $b?$b:$a; GS>>} $max = create_function('$a,$b', 'return $a < $b?$b:$a;'); Is it _that_ different? -- Stanislav Malyshev, Zend Products Engineer stas@zend.com http://www.zend.com/ +972-3-6139665 ext.115