What do you think?
Rate this book
202 pages, Kindle Edition
First published October 1, 2014
This book explains how you could use functional programming to improve on what you do. The authors did not engage much in theory, however, they proceeded by examples to explain different aspects of functional programming.
I set my eyes on this book when it was announced, in hopes to find the answers for two questions:
1. What are the core principles of functional programming? What factors can be used to judge a piece of code to adhere to functional programming well?
2. Why should someone switch to / adopt more functional programming?
Despite being referenced many times in the book, both questions were not its main focus. The book focuses on teaching you how to leverage functional programming for the benefit of your programming skills, while using Swift. So the book is most perfect for people who are not waiting for a theoretical approach on the subject, but who are open-minded enough to mix different paradigms and ideas in their practices.
I can safely claim that Swift was designed from day one to fully embrace functional programming, and it's comfortably sitting in the that suite behind Haskell along with Scala, F#, OCaml and their sisters. You can go fully functional with it, or you can easily mix it with OOP. Or you could just ignore everything sweet Swift has to offer and just write Objective-C without semicolons.
I'm currently in the midst of a storm, trying to wrap my head around FP, OOP and the right ways to mix both. Some of the FP purists abhor OOP, and declare it the next worst thing after Nazis. As I myself am evolving in OOP, and have just started to understand its principles well, despite having spent almost 8 years in the industry divided between college and work. I can boldly claim that a lot of people don't understand a nickle about what OOP is about. While one of the perks of FP having little following compared to imperative and object-oriented languages, is that it hasn't been plagued with bad practices yet.
In conclusion, I think it's possible to mix FP and OOP in practice. Martin Odersky's Functional Programming Principles in Scala gives some good insight in that.