DEV Community


Discussion on: We Don't Need No Stinking map() or filter()

kepta profile image
Kushan Joshi

While reduce can pretty much do anything, I would recommend that you also mention that not to use the same hammer for every kind of nail. We developers like to stay in our familiar territory and thatโ€™s why we avoid trying out new things, it would really suck if a fellow developer uses reduce to do everything, when they could have used other more optimised things.

jdsteinhauser profile image
Jason Steinhauser Author

You are absolutely correct. I eluded to the fact that map and filter were more optimized than their reduce implementations, but I need to reiterate that at the end. Thanks for the feedback!