Re: PHP 6.0 Wishlist
| From: | George Schlossnagle | Date: | Mon, 15 Aug 2005 19:10:16 +0000 |
| Subject: | Re: PHP 6.0 Wishlist | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 12 13 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-18143@lists.php.net to get a copy of this message | ||
On Aug 15, 2005, at 2:52 PM, sebastian wrote:
W4: Better lambda/anonymous functions and debugging for them. Consider Perl's anonymous functions which disappear as the references to them disappear. See the create_function() docs for notes about "memory leaks."Well, Perl subroutines are first class objects, while PHP functions are not. That having been said, one of the number one things I miss from perl is being able to say: $sub = { ... }; The nice part is that you don't need to do wacky escaping inside the text for the function. It would be swell for PHP to support: $func = function ($a,$b,$c) { // ... } and also require no escaping (even while using the existing create_function symbol table storage semantics).