I agree that overcomplicating code is bad, but then again, what is "simplistic"? Let's talk Python. To me, using comprehensions is way simpler than loops. Using for i, item in enumerate(my_list): # do some stuff with i and item is way simpler than for i in range(len(my_list)): # do some stuff with i and my_list[i] And still, I bet that most C/Java folks will look at these things with disdain. Also, higher-order funct…
I could make an awful enumerate implementation in C:
#define enumerate(item, array) for (int i = 0; i
...But then everyone reading it would have to go read my enumerate definition, whereas they'd understand the regular for loop immediately.I think higher-order functions are a great tool when they're used to remove complexity. The tricky part is that your reader needs to already understand how they work. If adding the definition of a higher-order function would make your code longer than simply not using it, I think it's a bad case to use it.