I have finished a pass over the fundamentals of the book Functional Programming Made Easier by Charles Scalfani. This is not a complete pass, since I skipped a few parts.
In my opinion, it is a very good engineering book, written by an engineer for engineers. It is the most useful book on the topic of functional programming I have read so far. It just clicked like no other books, and I have tried at least 5 different books across Haskell and Scala.
It should be treated as a tome of references that you will go back to many times. On the other hand, if you choose to go through it chapter by chapter (as the author intended) you will gain a very solid foundation in functional programming.
Once I got far enough into the book, I started noticing a few patterns that the author keeps repeating. These are actually valuable habits to pick up for beginners, because they are condensed probably from years of real-world experience. However, they indeed added some noise to my learning process. This is not a problem with the book per se, but rather to show how dense with information the book is. It contains both theoretical and practical information.
In this first pass, I covered the foundational concepts and developed a wholistic intuition for functional programming:
- the syntax and semantics
- the data abstraction philosophy
- the math and theory that support this philosophy
- the applications of this philosophy
Overall, it took me about 12 months. I spent the first 8 months on the first half of the book, jumping and skipping and recurring liberally throughout the chapters. I took heavy notes during this period. I needed to soak up on the syntax, core concepts and theory (algebraic structures and some category theory). I then spent the next 3 months on covering the second half of the book. This is where I got to the fun stuff like monads and transformers. I also got a taste of some practical libraries for client-side and server-side development. Unfortunately, at this point (2023), some libraries such as HTTPure had been deprecated. This is not a big problem, because I now am much more comfortable reading and understanding Haskell, which has almost identical syntax but with a much larger community of tools and libraries. This scenario also seems to be within the expectation of the author, because he mentioned in an early chapter that the book also prepares the readers for growing beyond PureScript. It's a fantastic closure.
It's been totally worth the time and effort. Is this what it feels like to be a demi-god? It's like the scales have fallen off my eyes, and the world of programming has suddenly become so much more vibrant and full of possibilities.
Another thing to note is that I insisted on traversing all the chapters of the book at least once, however imperfect that process is. I am glad I made that decision and persisted through it. I had an intuition that some insights could only be found in having an incomplete but total model of the book in my head. And I was right.
This pass has indeed put many things into perspective. I will revisit to bolster the parts that I skimmed or missed.
I am looking forward to Lens and Optics.