DEV Community

Discussion on: The Most POWERFUL [JavaScript] Function

Collapse
 
siddharthshyniben profile image
Siddharth
Collapse
 
cleancodestudio profile image
Clean Code Studio

A "4 Reasons to avoid using Array.reduce" blog post - nope! Not happening, not while I've got air in my lungs and life in my limbs.

I owe you Siddharth, I'm headed in right now to wage war in the comments section to rise up against the mis-guided non-sense that such an article would have you believe.

Catch you on the flip side, me and my overly opinionated beliefs are about to post up and make an impassioned comment responding to such non-sense.

Reduce is the most powerful and absolutely amazing mother f***** function on the planet, this is my stance, I've chosen my hill - I'm willing to die on it.

Collapse
 
siddharthshyniben profile image
Siddharth

Not saying that reduce is bad – It's just harder to read. When I was a newbie, it took me a day to understand what it did. That's why I said not to use it. If you care about others being able to read your code, then you should use it less.

Thread Thread
 
cleancodestudio profile image
Clean Code Studio

Okkkay, was that your article post that I commented on @siddharth ? Were you the actual author of the post? If so, I hadn't put two and two together.

I absolutely get where you're coming from from a professional stand point. I'm sharing my highly opinionated view point in a very strong way just to have some fun with it and push reduce forward a bit because I think it gets a bad wrap for readability when my take is that it has less to do with readability and more to do with capability of developers using it.

In a real project you should always take into account your team, and if it is not something that will be ubiquously understood then you should either take the responsibility on to teach it to your team personally or drop it all together.

I figured if we were to start a comment war on each others posts then it would just up kick the conversation and provide both posts with more traffic. Truth be told, I love having the countering perspective directly linked to in this post.

I don't want anyone to think - hey, Zak said it, so it must be true. I try to encourage the challenge of differing perspectives and in cases where it's my personal blog or YouTube channel's brand I'll push the emotion to see what kind of conversations we can spark up.