9 of 9 people found the following review helpful
Verified Purchase(What is this?)
This review is from: Real-World Functional Programming: With Examples in F# and C# (Paperback)
There are not many technical programming books that could also be decribed as page-turners but this is definitely one of them: everything about it is perfection. Real-world Functional Programming is exceptionally well-written and well backed-up by a wealth of on-line supporting material; the author, Tomas Petricek, himself is readily accessible online and very much a leading contributor to the most popular functional programming fora.
This is best described as a functional programming course rather than a reference book and it is structured accordingly; the four parts: "Learning to think functionally", "Fundamental functional techniques", "Advanced F# programming techniques" and "Applied functional programming" provide a very thorough basis for becoming a functional programming professional. I think this book is mainly aimed at people taking their first tentative steps into the functional programming world - probably from an imperative language like C#. The first part is a gentle but thorough exploration of the functional programming paradigm and how it differs (immutability, compositionality) from imperative languages. Functional language concepts are the ideal solution to a number of programming tasks and we see how many functional concepts are finding their way increasingly into imperative languages (LINQ, Lambdas in C# for example). By the time we reach the end of part three "Advanced F# programming techniques" we have looked at functional design in different arenas (Data-Driven/Behaviour-Driven); how to program efficiently in functional languages (and where to benefit from the multi-paradigm F# language to improve efficiency via mutability whilst remaining functional by hiding this mutability); we explore, pragmatically but in some depth, the scary concept of monads and use these concepts to write our own monadic types (computation expressions in F#). At this stage you should be feeling very confident, so we can safely move on to the final section which looks at a number of real world programming problems and how to solve them functionally (particularly asynchronous and parallel techniques).
The book is crammed with all the code snippets you will need up to the final section at which point you are given the main features but left to flesh out the body of the code yourself (assuming you are coding the examples); however, all the completed solutions are available online should you want to refer to them (I recommend doing this anyway).
I've been a C# programmer for many years but since developing an interest in F# 18 months ago this has been by far the best book I've read, not only on F# but on the wider functional programming concepts; but even if you only ever intend to stick with imperative languages, the functional concepts explained in this book will surely improve your code.