IHP 1.0 is out now!

Will reading a Haskell book help adopt a functional programming mindset?


I’ve been using Elixir on personal projects for a while (I even managed to create a dashboard tool at work using Elixir which is now on some screens in the office), but I still feel I haven’t made the switch of mindset from imperative to functional, I’m working with Java at work, and I think that thinking more functional will help me to be a better programmer. I studied functional programming at uni a long time ago, but now I really wanna go in depth to change my mindset, and I think that in order to understand I should go and read books about pure functional languages. After researching I think I’m gonna read a Haskell book, real world haskell- do you guys think this is a good idea, that reading a book like that will help me to understand the concepts about functional programming and help me to change my imperative mindset?

marc PRO

IMO the best way to switch the thinking is by practising. I found it useful to read "Learn you a haskell" while getting started, but to really get into the FP-thinking mode you need to build functions, types and smallers programs with haskell.


For an introduction to recursive thinking (which will be helpful in all your functional programming endeavors):

The Little Schemer

As for an introduction to Haskell (assuming pretty extensive experience in other languages), I recommend:

Get Programming with Haskell


If there's one book I've found that can help with this, it's Category Theory for Programmers by Bartosz Milewski. This is not your typical category theory text and the title should not intimidate. It's a highly accessible entry point into the theoretical underpinnings of Haskell and FP. You will gain a deeper understanding of and appreciation for the abstractions that lie behind the magic of functional languages. Bartosz also provides extensive code examples from C++ (his background before Haskell) juxtaposed with the Haskell equivalents to highlight the elegance and simplicity you gain from solving problems in a pure functional language vs. imperative.