‹ BackHN Continuity

Thread

Anecdotally, programmers dislike "reduce"

175 points · 283 comments · vinhnx

  1. antfarm · · focus · HN ↗
    I remember finally getting what closures and reduce are when I learned Ruby in 2008 for my first Rails job.

    A pivotal moment on the same level as when I finally understood how recursion and pointers work in 1995 in my first semester CS classes (taught in Modula 2), two concepts I had only ever read about in programming books, but not been able to understand on my own.

    In 2024 I did Advent of Code in Swift, without using mutable state, custom data types or loops, and used reduce rahther generously. [1]

    [1] <a href="https:&#x2F;&#x2F;github.com&#x2F;search?q=repo%3Aantfarm%2FAdventOfCode2024+reduce&amp;type=code" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;search?q=repo%3Aantfarm%2FAdventOfCode202...

Open on Hacker News to reply ↗

Unofficial Hacker News client; not affiliated with Y Combinator.