Comment

Comment by exelib

Not sure I agree with the author. It took me less than 3 seconds to understand the initial code, but at least 10 seconds to understand the final result, even I had the knowledge of the initial function. But in some context this pattern can make a perfectly sense. Just not in this example.

Furthermore, from my point of view, creating an anonymous function and then store it in a variable is a bigger code smell.

parent exelib 3 years ago

No comments yet

Be the first to share your thoughts.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton