Re: Closures in PHP
| From: | Richard Lynch | Date: | Tue, 15 Jan 2008 03:05:23 +0000 |
| Subject: | Re: Closures in PHP | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-267268@lists.php.net to get a copy of this message | ||
On Mon, January 14, 2008 8:13 pm, Larry Garfield wrote:
> On Monday 14 January 2008, Richard Lynch wrote:
>> If you want something that esoteric, go use Lisp. :-)
>
> You are aware that of the "modern" web languages (PHP, Javascript,
> Python,
> Ruby, etc.) PHP is the only one that doesn't have at least partial
> closures
> and dynamic functions, right?
PHP has create_function, which is a (very) partial closure.
And, really, I don't see it as a big lack either...
I've needed a stupid one-liner un-named function in PHP, and
create_function is awkward as [bleep] but it does work...
I've never felt the need for a full-blown closure, in over a decade.
But maybe that's just because I like to keep things simple.
--
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/from/lynch
Yeah, I get a buck. So?