Comment

Comment by Zak

I think replacing common usage patterns of generic control structures with named constructs adds clarity:

    for(blah blah blah)
tells the reader nothing more than there's going to be a loop, but

    map(blah blah blah)
tells the reader one sequence is going to be transformed into another by applying a function to each item. That's more informative to the reader if used for its intended purpose. It has the opposite effect if abused to repeatedly call a function mainly for its side-effects.

All programming techniques should be viewed as means to write code that's some combination of readable, reliable and performant, not as ends themselves.

parent Zak 9 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton