News for hackers. Stuff that matters.
Re:Why I Prefer Functional Programming by AnimalMuppet on Monday November 02, 2020 @03:48PM (#24973116)
If I have a "known" function, map() for instance, and I pass a function into it, that's fine, because I already know what map() does. But if I have a function foo() that takes another function bar(), and I don't know what either one does, then I have to look at both foo() and bar() to understand what is going on. I have to look at two places, not just one.

But this is not unique to FP. If I'm using OOP, I can do the same thing with virtual functions. In UI frameworks I can do the same thing with callbacks.

Frankly, I don't like it, whether it's FP or not.

There are no comments on this comment yet.