

Real-World Functional Programming: With Examples in F# and C# [Tomas Petricek] on desertcart.com. *FREE* shipping on qualifying offers. Real-World Functional Programming: With Examples in F# and C# Review: 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). Review: 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.]
| Best Sellers Rank | #2,803,866 in Books ( See Top 100 in Books ) #339 in Microsoft .NET #433 in C# Programming (Books) #3,075 in Computer Programming Languages |
| Customer Reviews | 4.3 4.3 out of 5 stars (45) |
| Dimensions | 7.38 x 1.4 x 9.25 inches |
| Edition | First Edition |
| ISBN-10 | 1933988924 |
| ISBN-13 | 978-1933988924 |
| Item Weight | 2 pounds |
| Language | English |
| Print length | 560 pages |
| Publication date | January 25, 2010 |
| Publisher | Manning Publications |
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.
R**G
rien à redire et livraison dans les délais, surtout que c'était pour un cadeau. Ce livre m'avait été conseillé et la Personne qui l'a eu était très contente. Je recommanderai si l'occasion se présente.
K**E
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.
D**T
As it states in his "About this book", "This is not a quick guide to F# programming", this should probably not the first book on F# to read. But this book is perfect for a C# programmer who wants to make a move to F#. It lets you gradually think in the functional way of doing programming with many F# and comparable C# example code. Only downside (but for that I cannot give this book a star less): if you want to try the F# examples you have to be aware of the way F# handles whitespace. I also purchased Programming F# where this topic is well explained.
A**R
Very well written and accessible book, as you would expect from these two authors - both of them prolific posters on Stack Overflow. It is a bit heavy going - but its hard to introduce a whole new paradigm of programming without being so, I guess.
P**W
This book is superb for introducing functional programming and doing so in a way that helps imperative programmers grasp the (many) functional concepts they need to know. Also an excellent F# reference. Looks of good, practical examples.
Trustpilot
1 week ago
2 weeks ago