Functional Programming in C#, 2nd Ed (Manning) |
Author: Enrico Buonanno My personal opinion is that it isn't if you mean hard line academic functional programming - for that you need Haskell or one of the languages designed to be functional from the start. C# is a general multi--paradigm language, but it has enough functional characteristics for the weekend functional programmer like me. Surely even F# would be a better choice for a book on functional .NET programming? Not necessarily. The first thing to say is that to augment the functional features of C# a custom library is used and it is difficult to know if this library is up to production code standards. The library is based on another open source library but again it is difficult to know if you can rely on either being around in the future. However this potentially serious defect may not be a defect at all if you actually read and learn from the book. The point is that the book is explaining functional programming at a sufficiently deep level for you to implement your own function extras and know what might go wrong. Part 1 of the book is titled "Getting Started" and it introduces functional programming using LINQ among other things - this is a really good idea. It goes through the basic ideas of functional programming but even if you think you know the basics it is still worth reading carefully as the ideas are described in much better detail than most. The explanations of using functional programming to simplify concurrency is particularly interesting because it highlights the difficulties of the approach so well. Part 2 is "Core Techniques" and this deals with the idioms of functional programming, how to design functions and use data objects. The section on dealing with Option and Nulls is particularly interesting as it is exactly the sort of thing that throws the beginner. The section on Patterns is also worth reading as it deals with many of the questions that are raised in the mind of the beginner that are often ignored. Part 3 is on "Functional Design" and, yes, here we get to the infamous monad and by this point it seems all very reasonable rather than something theoretical and unnecessary. So much so that by the time you reach Part 4 "Advanced Techniques" it is difficult to think up what could be still to cover. It covers lazy evaluation, managing state, asynchronous, data streams and message passing. This book has a lot to offer the existing C# programmer, even if you don't anticipate moving to a functional paradigm in the near future. It's not an easy book to read and it will test your knowledge of C#, but if you stick with it then you will follow much of the rationale and principles of functional programming. Unlike many other books on functional programming it really does aim to explain and justify rather than simply present an academic view which is simply unassailable because of its credentials. Oh, and you can learn a lot of C# as well as functional programming on the way - highly recommended.
For recommendation of more books for C# programmers, see the Programmer's Bookshelf Top Choice C# Titles To keep up with our coverage of books for programmers, follow @bookwatchiprog on Twitter or subscribe to I Programmer's Books RSS feed for each day's new addition to Book Watch and for new reviews.
<ASIN:1871962714> <ASIN:B09FTLPTP9>
|
|||
Last Updated ( Wednesday, 18 October 2023 ) |