r/functionalprogramming • mod • Oct 31 '20

Why I prefer functional programming

http://www.haskellforall.com/2020/10/why-i-prefer-functional-programming.html
30 Upvotes

6 comments sorted by

View all comments

2

u/drfisk Nov 01 '20

I agree with most of it, but regarding your point "Dependency injection? Use a higher order function instead", I disagree since dependency injection is all about automatic "wiring".

I think HOFs is more of a replacement for most interfaces.

2

u/[deleted] Nov 01 '20

It sounds like perhaps you'd prefer a Reader in that case?