Hacker News new | ask | show | jobs
by rnprince 3234 days ago
I mean, I keep writing for-loops even though I've written many of them before.
1 comments

Found the imperative programmer.

I'm only half-joking: how often do you need an actual for loop instead of the more abstract concepts of mapping/reducing collections?

I think you made his analogy stronger, not weaker.

As a programmer I am (should be?) concerned with the actual implications of which data structures I use, not how to use them. It should be seamless.

You wouldn't judge an EE on his ability to build wires after you give them some copper and plastic. Sure, he could with tools and a bit of time. It's just a waste of everyone's time and effort.

Some languages don't have first-class functions that you would pass into a map or reduce function, which makes writing loops unavoidable.

But even if you do use map/reduce all the time instead of loops, you're just saying the same thing I did in another way - unless you're doing it for the intellectual thrill of writing a call to map/reduce for the n+1th time.