Real-World Functional Programming: With Examples in F# and C#
A**K
a pragmatic approach to F#, especially for C# programmers
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 come for free in FP (e.g. the "visitor" pattern).
C**B
Develop Both Your C# and F# Skill Sets
I purchased this book about a year ago, but didn't begin reading it in earnest until recently. (I'm generally been interested in functional programming, but not until recently have I decided that a scientific application I've been writing would probably benefit from domain logic written in a functional language.) I'm about 60 pages into the book, and loving every second! This book is geared toward teaching *fundamental functional principles* from an OOP starting point. The presentation of F# syntax, while present, seems secondary to the fundamentals.What has really struck a nerve in me is how much greater appreciation I have for the weaknesses that C#/OOP can present. For example, the author's discussion of side effects and mutability (OOP programmers accept this an move on), were placed in a new (and insidious) perspective for me. Have any of you studied the many functional influences grafted into the C# language (e.g., generic delegates, LINQ) and thought, "There's some larger perspective here I'm not being told?" (Almost like a joke you're not being let in on?) This book gives you that larger perspective. I have already had many moments of revelation.Will this book compel me to abandon C#? Will it convince me to take up F#? I really don't know, and I don't care. Fundamentally, this book is giving me a fresh perspective into C#, and the book is well worth the price of admission right there. To the extent that I'm also learning functional programming concepts, all the better!I also offer my thanks to Manning, who has put together a mind-blowing collection of C# titles. Thanks so much![Full disclosure: I'm a non-professional, enthusiast programmer (C#/WPF), so qualify my opinion with that perspective.]
A**N
Four Stars
Good book with decent coverage of functional programming in F# and the functional capabilities added to C#.
R**S
Best intro to Functional Programming for the .Net developer.
Awesome book.I would like to recommend it to any .Net developer like me whom wants to discover and learn functional programming without much compromise.This is not a book to teach you F#, it'll explain a lot and you'll be able to use some F#, but the main focus is the FUNCTIONAL PROGRAMMING, which is awesome.Very well written, objective and touched the most important concepts of functional programming (closures, partial application, explained BIND to me, 1st order functions, tail recursion).If you like what you read you can go further. Best intro I have found to .Net devs.I'll finish saying, i cannot remember my old mindset before this book.Buy it.
C**Y
More than just a fine introduction to functional programming and F# ...
This book is more than just a really good introduction to functional programming and much more than just a primer on F#. It succeeds in being one of the really excellent programming texts.The book is focused around teaching the core concepts of functional programming and the practical applications thereof. In the process, the reader gets to learn F#, but also to do functional programming in a primarily imperative, object-oriented language: C#.As a result, one will learn the programming paradigm, readily see its utility, and thereby get trained to identify applications for it. And, as a bonus, have a good grounding in coding functional solutions.
J**E
Good book for C# programmers.
Not finished reading, but this is an excellent book if you are already a C# programmer. I like how they show examples of the same code in F# and C#, and how to write more "functional" C# code -- that really helps to explain concepts.The only thing I disklike about the book has a little bit too much boilerplate: Every section starts with a summary of the previous section, plus a summary of the next section. It can get repetitive.The author's are very smart, and give good explanations. I'm learning a lot.
Trustpilot
1 day ago
1 month ago