Announcing "Thinking Functionally in PHP"

in #php4 years ago (edited)

Calling all PHP developers! Want to wrap your brain around functional programming? Are you sick of reading tutorials about this magic "monad" thing but having no idea how to read Haskell? Then this book is for you.

Announcing Thinking Functionally in PHP, by yours truly, available now on LeanPub.

PHP, functional programming, and category theory, all in one short volume

PHP 7.4's introduction of short-lambdas is a game changer for functional PHP. While it doesn't make anything new possible, it makes a lot of things suddenly practical. That's what this book is about: What is now practical to do in PHP in terms of functional programming.

To really understand functional programming beyond the basics, however, requires at least a little academia. To that end... I finally learned what a Monad is, and hopefully was able to capture it in in the book during the brief period as I crossed the Curse of Monads threshold.

"Once you understand monads, you immediately become incapable of explaining them to anyone else."

--Gilad Bracha

If not, at least it's a decent intro to category theory that any programmer can appreciate.

I want to give a shout out to a few people who helped make this book possible:

  • Nash van Gool, who provided early validation that my early efforts were not entirely incomprehensible.
  • Nash and my colleague Chad Carlson, who served as beta testers for the first draft of the manuscript.
  • Shayna Steinberg, for reviewing the category theory section and validating it is comprehensible even for non-programmers/mathematicians.
  • Bartosz Milewski, whose book and website "Category Theory for Programmers" is the best tome on the subject to date. He also was kind enough to answer my random validation questions on online forums, even though he had no idea why I was asking.
  • My editor, Kara Ferguson, without whom it's quite possible there would be not a single comma in the right place in the entire book.
  • Rebekah Simensen, who provided the delightful cover art.

I do hope you enjoy it, and if you do that you share the joy with others and encourage them to buy a copy as well. LeanPub books are all DRM-free, so please share the news, not copies of the book. ;-)