Hacker News new | ask | show | jobs
by simplify 3150 days ago
> The term “higher order” generally indicates complexity and indirection.

As do all abstractions.

> If you can solve something first order, then that is much more preferable to a higher order solution.

a.k.a. "To abstract, or not to abstract?". It really depends, of course. But I know for certain I would not want to solve "mapping over an array" without the Array.prototype.map higher-order function.

1 comments

It really depends. Higher order debugging is more of an art than reality, so if the mapping logic is tricky, I would definitely convert a map into a loop just so I had better access to debugging. It should never be “use map whenever possible.” Also, if you drift out of well known functional origami to more niche uses of function arguments, well, there be the dragons.