Hello !
I've always thought that just supressing the "function" keyword could work as a shorthand, i.e. having ([param1 [, param2 [, ...]]]){...}. Somewhat similar to Ruby's lambda shorthand: http://slideshow.rubyforge.org/ruby19.html#40
Huge +1 for that. Code using closures will be more readable.
$add = | $x |=> | $y : $x |=> $x+$y;
Not sure that it's really readable. Moreover, it's more Perl/Ruby way than PHP way.
Best regards, Fred -- ======================================================================== Frédéric Hardy : Architecte d'application/Admin. système/Ergonome CV : http://blog.mageekbox.net/public/cv.frederic.hardy.pdf Blog : http://blog.mageekbox.net Twitter : http://twitter.com/mageekguy ======================================================================== -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php