|
|
|
|
|
by zo1
4420 days ago
|
|
I really don't understand this obsession with anonymous functions. If you're doing anything longer than one line, there is absolutely no reason why you should be sticking the entire function definition as a parameter. I've had great usage from Javascript where I have separate functions with proper names and formatting, and then pass a reference to them into the code that asks for them. Can someone please enlighten me about this whole anonymous functions thing that Javascript seems to have popularized? What are some of the pro's of using it over regular named/defined functions that sit by themselves and are reusable. |
|