Re: Re: PATCH: anonymous functions in PHP

From: Date: Thu, 20 Dec 2007 18:12:12 +0000
Subject: Re: Re: PATCH: anonymous functions in PHP
References: 1 2 3 4 5 6 7 8 9 10 11  Groups: php.internals 
Request: Send a blank email to internals+get-34158@lists.php.net to get a copy of this message
1) you need to declare them somewhere, which doesn't make much sense if these functions are meant to be used only in such context.
If you need them in context, you can declare them in context.
Sometimes there are even problem to give meaningful names to such functions
Just describe what it does. If it is not unique, then the function is not unique.
2) inline-function is a good candidate for automatic optimization (in case of array_filter, array_map and similiar the construction can be converted to the loop)
We have neither such optimizations nor any plans to make those, AFAIK.
3) as the result of (1) and (2) it can be used for fast "currying" of other functions
And why we need fast currying of other functions? -- Stanislav Malyshev, Zend Software Architect stas@zend.com http://www.zend.com/ (408)253-8829 MSN: stas@zend.com

« previous php.internals (#34158) next »