‹ BackHN Continuity

Thread

Anecdotally, programmers dislike "reduce"

175 points · 283 comments · vinhnx

  1. mahboi · · focus · HN ↗
    Reduce always makes me question the performance and order of operations. The most I'll do in Python is like

      sum(x[1] for x in args)
    
    which is map + reduce. And that's only if x[1] is a number. That's about it. No equivalent in JS. Whenever some JS code has map, I'm like why, and rewrite it as a loop.

    This is also assuming we're talking about regular code and not an actual map-reduce framework like Spark.

Open on Hacker News to reply ↗

Unofficial Hacker News client; not affiliated with Y Combinator.