
Ebook Info
- Published: 2010
- Number of pages: 500 pages
- Format: PDF
- File Size: 7.23 MB
- Authors: Tomas Petricek
Description
Functional programming languages like F#, Erlang, and Scala are attractingattention as an efficient way to handle the new requirements for programmingmulti-processor and high-availability applications. Microsoft’s new F# is a truefunctional language and C# uses functional language features for LINQ andother recent advances.Real-World Functional Programming is a unique tutorial that explores thefunctional programming model through the F# and C# languages. The clearlypresented ideas and examples teach readers how functional programming differsfrom other approaches. It explains how ideas look in F#-a functionallanguage-as well as how they can be successfully used to solve programmingproblems in C#. Readers build on what they know about .NET and learn wherea functional approach makes the most sense and how to apply it effectively inthose cases.The reader should have a good working knowledge of C#. No prior exposure toF# or functional programming is required. Purchase of the print book comes with an offer of a free PDF, ePub, and Kindle eBook from Manning. Also available is all code from the book.
User’s Reviews
Reviews from Amazon users which were colected at the time this book was published on the website:
⭐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).
⭐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.]
⭐The core content is fairly good, but it is ruined by the exposition: the same concepts are repeated multiple times in different places (e.g. fold operation, immutable data structures), and there is a ton of redundant verbiage (I don’t know how else to call it) that obscures the actual information and makes the reading a slog.An example of what I mean by ‘verbiage’ – on page 156: ….Let’s now analyze how it works in some more detail. 6.4.3 Evaluating the example step by step It can take some time to become confident with high-order functions like these, especially when they are nested. We’re going to examine how the code from the previous listing by tracing how it runs for a few sample inputs. Moving from the abstract question “What does this code do in the general case?” to the concrete question of “What does this code do in this particular situation?” can often help to clarify matterThis does not actually say anything – it just introduces what it’s going to be written after – that you are going to read in any case. This is a page I opened at random – the book is full of this – constantly telling you what you just read and what you are going to read.On top of this some more advanced stuff like continuations gets short (and not very illuminating) explanations – that is sort of galling in the middle of all this redundant stuff.It could have been a good 200-300 pages book, instead it is a mediocre 500+ pages ones.
⭐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.
⭐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.
⭐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.
⭐I must have in your bookshelf
⭐Very good book, if you want to study F# and know – C# – it’s the best book for you
Keywords
Free Download Real-World Functional Programming: With Examples in F# and C# 1st Edition in PDF format
Real-World Functional Programming: With Examples in F# and C# 1st Edition PDF Free Download
Download Real-World Functional Programming: With Examples in F# and C# 1st Edition 2010 PDF Free
Real-World Functional Programming: With Examples in F# and C# 1st Edition 2010 PDF Free Download
Download Real-World Functional Programming: With Examples in F# and C# 1st Edition PDF
Free Download Ebook Real-World Functional Programming: With Examples in F# and C# 1st Edition