3 ms·
"The point of an anonymous function isn't to make it not have a name, but to be able to define it where it is needed instead of referring to some specific funct
by gngeal 14y ago
"The point of an anonymous function isn't to make it not have a name, but to be able to define it where it is needed instead of referring to some specific function name in your code."
Actually, its point is to make it a value that can be referenced from any number of bindings (associations between names and values) in any number of scopes. What you're saying is just a consequence of this.
"It also fits well with the way PHP handles "pointers", by storing the name of a variable in another variable."
Which only shows the deficiency, since any such indirect reference should never refer to a name, but to a binding instead.