I have used trees in almost every moderately complicated program I've ever written, both for fun and at the office.
I have used trees in almost every moderately complicated program I've ever written, both for fun and at the office.
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.
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.
def visit(node):
for child in node.children:
visit(child)
I don't hire people in my current position, but I certainly think anyone baffled by that would be a giant red flag. It's simpler than FizzBuzz.