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.
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!
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
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.
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!