Most Helpful Customer Reviews
17 of 17 people found the following review helpful:
5.0 out of 5 stars
a pragmatic approach to F#, especially for C# programmers, April 4, 2010
This review is from: Real World Functional Programming: With Examples in F# and C# (Paperback)
A hallmark of this book is a very pragmatic, Rosetta stone approach to F#.
Since F# lives in .Net, and .Net is inherently object-oriented; it makes sense to understand something of the mapping that takes place behind the scenes when F# code is mapped into the .Net world.
Many of the interesting new features introduced into C# are actually hand-me-downs from FP (functional programming). This includes generics, LINQ, anonymous methods, lambdas, type inference, etc.. Since many programmers need to use C# in the work-a-day world, it makes sense to understand the functional elements of C# by seeing them in a functional language like F#, where they can be seen in their purest (least hobbled) state. Once these concepts are understood, it is then much easier to understand how to wield these tools effectively in C#.
That said, there are also limits to how much functional programming can be done in C# (and how effectively it can be accomplished). This book clearly demarcates the boundaries of what is (and isn't) feasible in C# vis-à-vis functional programming.
One of the things I liked best about this book is the discussion on why functional programming makes code easier to read, write, and verify. This discussion does not appeal to what might be (for many) inaccessible theory (i.e. denotational semantics, category theory, etc.). Instead it is demonstrated in amazingly simple, straightforward ways! This discussion is very effective.
Another facet of this book's approach that I applaud is the demonstration of lambda calculus. Why would a practical book dabble in theory? There's actually a very pragmatic payoff in doing this: functional programming has a lot of underpinnings in lambda calculus. Those that have been exposed to lambda calculus will feel right at home in F#. Those that haven't are likely to feel more "culture shock" when being exposed to concepts like currying and lazy evaluation. Functional programming really does represent a substantially different way of thinking about computation.
This book also features an excellent discussion about design patterns; comparing and contrasting how they are implemented in OOP (object-oriented programming) versus FP. Some classic design patterns in OOP essentially comes for free in FP (e.g. the "visitor" pattern).
Help other customers find the most helpful reviews
Was this review helpful to you? Yes
No
9 of 10 people found the following review helpful:
5.0 out of 5 stars
Excellent tutorial with a unique approach, January 12, 2010
This review is from: Real World Functional Programming: With Examples in F# and C# (Paperback)
I usually don't like tutorial-style books, but am finding this one invaluable. More than the other F# titles to date, it explores at length what makes functional programming different, and what this means in a .NET context. A unique feature is the running comparison of F# with both traditional and "functional style" C#. Code listings are nicely labeled with arrows pointing out important details. The book is not intended as a language reference, and only lightly touches on the imperative and object-oriented sides of F#, or contents of standard .NET libraries, but this allows a more leisurely and thorough treatment of the distinctively functional concepts and their implications for program design. Highly recommended.
Help other customers find the most helpful reviews
Was this review helpful to you? Yes
No
11 of 13 people found the following review helpful:
5.0 out of 5 stars
Good Book., January 5, 2010
This review is from: Real World Functional Programming: With Examples in F# and C# (Paperback)
Functional Programming for the Real World, by Tomas Petricek and Jon Skeet,
introduces the functional programming paradigm by comparison to more traditional
imperative programming techniques. The first part of the book goes through many
common programming tasks and compares how you would implement them in the C#
programming language and then re-introduces the problem from a functional
perspective using F#. It introduces simple ideas such as recursion and how to
use recursion to simulate many iterative constructs to the idea of higher-order functions, all the while keeping the explanations and examples very clear. The
author also strives to instill good functional design practices in the reader by
introducing different ways to think of functional programs and common design
patterns that can assist in clean implementations.
The second half of the book dives into more advanced functional concepts, such
as lazy evaluation, efficiency, and continuations. It also takes a look at
using functional programming for practical tasks. Overall, this section is more
suited towards someone who understood the majority of the first half of the book, or to someone who is already familiar with functional concepts.
I would recommend this book to newcomers and intermediate programmers who are
looking to learn about or refine their functional programming skills. The
authors do a good job of covering the core material and also introduce a good
amount of advanced material towards the end of the book.
Help other customers find the most helpful reviews
Was this review helpful to you? Yes
No
|