DEV Community

Discussion on: Not every function needs a name

Collapse
 
macsikora profile image
Pragmatic Maciej

Generally what you said is almost exactly what I tried to describe in the article. With this difference that I don't understand Kyle dislike for anonymous functions at all, his arguments like - if you have no clue how to name something, name it - todo, are for me just bizarre. And I am not joking, he is really proposing that in his book.

I vote here for commons sense, name things when it has sense to name them, and if you do, name them accurate. There is nothing worst then bad names.

Thanks for the comment!

Collapse
 
joeattardi profile image
Joe Attardi

I think one of the main criticisms is that they just show up as (anonymous) in a stack trace, so it might make debugging harder.

Honestly, that's the only issue I can think of.