Do you need help on a specific subject? Use the contact form (Request a blog entry) on the right hand side.


Book review: Functional Programming in Swift

The bloggers at have published the book "Functional Programming in Swift". Being a sucker to learn new concepts, I bought it last week for some inspirational reading.

So is it any good?

Hmm, though question...

I have absolutely learned something from it, mission accomplished.

Does it do a good job of explaining functional programming?

I really don't know. I am no software expert in the sense of language techniques. I am a software engineer that writes software for a living. Though I like thinking about (software) engineering as a discipline, I have no affiliation with any major institution or philosophy in that field. So I do not really know what functional programming is. Hence I cannot compare the book to anything I already know about the field.
What I gather from the book, its no real 'biggie'. Sure there are some neat things in looking at software development though the lens of functional programming, but it is not a paradigm mover. Like -for example- OO was to procedural development. Based on the book, functional programming is probably of great interest to language developers and scientists, but not so much to actual developers that make their living writing software.
That is not to say that it is something you can skip over. Imo that would be the wrong thing to do. Every software developer should know what functional programming is to have another tool in his box. It is very useful that way. And there are some special niches where it is really handy.

As to the book, it is clearly written by someone who knows a lot about the field. Unfortunately the pace is rather quick, and grokking the book on a first read is not something I can do. The last few chapters went largely over my head. So I will have to revisit that once the parts that did register have settled.

So what did I like about the book?

I really liked the part where optionals and enums are explained. It is probably too steep for beginners, but when you have a working knowledge of optionals and enums, this is really something you should read. It could easily lift you to the next level.

What surprised me

Pretty much the same as above: apparently optionals, enums, generics, generators and sequences are considered part of functional programming. I did not expect that. But it is a very useful and interesting part of the book.
Another thing is that much of the concepts in the book are imo relatively seldom used by novices and intermediate developers. As such, introducing functional programming will (IMO) produce code that will be hard to read by novices and intermediate developers. Usually code becomes better readable by advanced programming techniques, but I found that many of the more advanced examples are pretty difficult to "read". Yes, they can all be understood, but it is not an "easy read". I am thinking here of situations where a junior developer has to take over work from a well seasoned developer. I am rather sure that the junior will need some hand-holding at first if the senior used a lot of functional programming techniques.

Is it worth its money?

Hmm, another though question.

It basically boils down to how much you value your time. Reading the book saved me a few weeks -if not months- of scrounging the web. While $35-$40 is a lot of money for the content, it gives me some kind of "closure" (LOL!) on the topic of functional programming. That in itself makes it worth its money too me. If you are not after such immaterial things, the book is probably too expensive.

What would I like to see different?

Hmm, maybe a slower pace and easier (smaller) examples. And a lower price of course!

Happy coding...

Did this help?, then please help out a small independent.
If you decide that you want to make a small donation, you can do so by clicking this
link: a cup of coffee ($2) or use the popup on the right hand side for different amounts.
Payments will be processed by PayPal, receiver will be sales at balancingrock dot nl
Bitcoins will be gladly accepted at: 1GacSREBxPy1yskLMc9de2nofNv2SNdwqH

We don't get the world we wish for... we get the world we pay for.

No comments:

Post a Comment