What is the problem that anonymous functions solve? I don't get it.
I think it depends on context. In JavaScript for example you can combine an anonymous function with an arrow function to access scope variables.
var a = 10; // this is inside some other function, not a global variable
myarr.filter(value=>{
return value == a; // can access "a" var
})
the "value => {}" is an anonymous arrow function with a single parameter. You can do something like:
var a = 10; // this is inside some other function, not a global variable
myarr.filter(function (value) {
return value == 10; // cant access "a" here
})
But you can't access "a" inside that function.
With FPC the paradigm is OOP, so if you work with objects and classes, there is no need of sharing the scope, since is self contained in the class. In other words in a class you can always access "a" because it for example is declared in the private section, and the filter function is inside the class.
If you don't reuse the function, and is used in a single place, like filtering with a certain criteria a single time, why declaring a function in the namespace for it? That means that function is used only there and should not be used anywhere. That's is the thing I understand to use them.
If you think with functions it has sense. If you think with classes, maybe not, because you can always declare a private function that is not used outside. That doesn't happen in JavaScript (private doesn't exist as easy), for example where is allowed anonymous functions.