So to answer your question, for my money, since I can't currently tell the
difference in a programmatic way between an 'anonymous function' and a full
'closure', I don't find it that worrisome that the PHP world somewhat
conflates the two terms.


For me it's worrisome because future developers, that are just starting programming with PHP, will need more time to understand that a non-anonymous function, i.e. a function that has a name, may just as well benefit of a closure concept (except in the PHP language (if I don't count importing of global variables using the global statement)).

A closure is not a special kind of function, a closure is just a link between a function (named or unnamed) and the environment it has been defined in.

I totally agree with Keryx, we should use the correct names for these concepts. If it was up to me, I'd name the internal class used to represent lambdas Lambda.

--
Ionut G. Stan
I'm under construction  |  http://blog.igstan.ro/

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

Reply via email to