On Dec 19, 2007 11:21 PM, Stanislav Malyshev <[EMAIL PROTECTED]> wrote:
> > So how big a part of PHP's userbase is that? I'm guessing, it's small.
>
> If it's small, we don't need it in the language anyway.

I think we need it. In the current incarnation, anonymous functions
are so impractical to use, that it's a barrier. I think that is
unfortunate, because it could be an interesting and useful direction
to take for PHP. The users, who don't know what a closure is, could
still learn to use anonymous functions and they would then not assume
closures. So even if the user base is small initially (naturally,
since the feature doesn't exist), it could grow. And for the rest of
us, it's at least better than create_function().

> Having no [closure] and knowing it is better than having something that
> looks like it but doesn't work. Saves time that would be spent
> unsuccessfully trying to make it work.
(I assume you meant closure?)

It can still work, without closures. Not all anonymous functions need
variable input and if they do, you can use currying. Admittedly,
currying has its own practical issues in PHP, but that's a separate
discussion. (And one, I'd like to take at a later time for that
matter)
The point is, that static lambda still has something to offer, even if
it doesn't allow closures.

-- 
troels

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to