Home - Functional
Expert F#
Price: $63.99
& 2-Day * Free Nationwide Shipping! (* details)
Availability: Usually ship in 24 hours if sold by Amazon.com
Product Details
| Binding: | Kindle Edition |
|---|---|
| EAN: | |
| Label: | Apress |
| Feature: | |
| Publisher: | Apress |
| Studio: | Apress |
Editorial Reviews
Expert F# is about practical programming in a beautiful language that puts the power and elegance of functional programming into the hands of .NET developers. In combination with .NET, F# achieves unrivaled levels of programmer productivity and program clarity. This books serves as
- The authoritative guide to F# by the designer of F#
- A comprehensive reference of F# concepts, syntax, and features
- A treasury of expert F# techniques for practical, real–world programming
While inspired by OCaml, F# isn't just another functional programming language. Drawing on many of the strengths of both OCaml and .NET, it's a general–purpose language ideal for real–world development. F# integrates functional, imperative, and object–oriented programming styles so you can flexibly and elegantly solve programming problems, and brings .NET development alive with interactive execution. Whatever your background, you'll find that F# is easy to learn, fun to use, and extraordinarily powerful. F# will help change the way you think about and go about programming.
Written by F#’s designer and two active contributors, Expert F# is the authoritative, comprehensive, and in–depth guide to the language and its use. Designed to help others become experts, the book gives a thorough introduction to the F# language from quick essentials to in–depth advanced topics such as active pattern matching, aggregate data types and operators, sequence expressions, lazy values, mutable data and side–effects, generics, type augmentations, functional decomposition and code organization.
The second half of the book is devoted to examining the practical application of F#, providing elegant solutions to common programming tasks including user interface implementation, data access, web and distributed programming, symbolic and numerical computations, concurrent programming, testing, profiling, and interoperability with other languages. The latest hot developments in F# and .NET are also addressed, including Active Patterns, implicit class construction, integration with LINQ over relational data, meta programming and useful tips for working with Visual Studio and F# command–line tools.
The worlds foremost experts in F# show you how to program in F# the way they do!
What you’ll learn
- How to use F# for functional, imperative, and object–oriented programming
- How to code elegant F# solutions with expert technique and style
- How to develop Windows, web, graphics, and database applications in F#
- How to do numerical, concurrent, lexical, and symbolic processing in F#
- How to interoperate with C and COM
Who this book is for
This book is for anyone interested in state–of–the art .NET programming. Professional programmers will find it engrossing. F# provides invaluable insight into the future of both C# and VB, which are now adopting some (but far from all) of the functional features of F#. Once they learn F#, few feel like returning to either C# or VB. The academic community will find F# the answer to a decades–long prayer: a language suitable for teaching computer science that also excites and empowers students because it can be used not just in the classroom, but also in the real world.
Customer Reviews
- Practical.
- High example density.
- Broad coverage of a lot of practical F# topics.
- Good depth on all the important practical stuff.
- I felt like I learned a lot, not only about F#, but about some cool C# features too.
- I felt like I'd be a lot more productive as a programmer if I could master the language.
The (not so) Bad
- Structurally, I initially got lost with some of the more complex examples. And it was straining to page back and forth re-reading things until I grasped the concepts. The density of information in the text sometimes makes it less valuable as a teaching aid and more valuable as a reference.
The (not so) Ugly
- I could not get one of the async examples to actually compile. I had to search the web for some hints to add declarations that seem to have been omitted from either the example code or F# implementation itself. In short, the example code, my development environment, F# itself, of some combination thereof was missing what appears to be an extension method for WebRequest.GetResponseAsync. I had to code it myself. But once I did, it worked! (This might not be a criticism of the book.)
F# is a wonderfully expressive and practical language and, at the same time, very elegant. This book will help the reader to apply this newfound power and to appreciate how even the most obscure features all seem to "hang together" so beautifully.
The first half of the book teaches the language with an excellent example-driven approach; making it fun and useful from the start. Separate chapters cover each supported programming paradigm: functional, imperative, object-oriented and language-oriented; along with chapters on solid engineering techniques such as encapsulation and packaging, and working well with other .NET code.
The second half of the book applies the language to various technologies (WinForms, web, database, ...) and to various very interesting domains including lexing and parsing, asynchronous and concurrent programming (a particularly strong suit). My absolute favorites were the symbolic differentiation and propositional logic samples in chapter 12 - these left me in a state of awe! Also, the second half covers more engineering concerns such as testing and debugging, interop and library design.
Throughout the book are sprinkled many little nuggets of wisdom from the authors; especially helpful to those who (like me) are struggling to rationalize experience in OO and imperative programming with the functional mindset.
The book contains an enormous amount of information; an essentially complete coverage of the language. However, it simply can't cover everything. Some topics missing include application to some specific technologies such as WPF and Silverlight. Also, functional data structures and meta-programming (with the extremely powerful F# quotations mechanism) are only lightly covered.
It's a very well written and well organized book. It makes for a great read when you're first mastering the language and makes for a great reference to keep on your shelf thereafter.
Expert F#, as suggested by its title, is not like this: it is aimed at more experienced programmers. The book will not teach you, for instance, what is functional programming or hammer to your head the best ways to use lists, an ubiquitous data structure in functional languages. But it explains how the things work in F#, so that programmers already familiar with other functional languages will have no trouble picking it up. F# also has object-oriented capabilities, which are explained in a chapter, without however going much deep into OO concepts; the book is about the language, not the paradigms.
And it does this well. Roughly half of the book is about the language itself, the other half are examples of applications and how to use some important libraries. As I was already familiar with OCaml and Haskell, I mostly skimmed through chapters 1 to 4, reading more closely starting with chapters 5 (generic types) and 6 (how objects fit into F#). From chapter 7 (encapsulating and packaging your code) on, the book starts to get really interesting; the next one is about common techniques, and chapter 9 is the best in the first part, explaining language-oriented programming, an area where functional languages really shine.
There are mandatory chapters about Windows Forms (11), Web programming (14) using .NET and data access, including how to use LINQ in F#, but I really liked chapters 12 (working with symbolic representations), and 13 (concurrency and asynchronous workflows). The former includes two cool examples: a symbolic differentiator and a verifier for logic circuits based on BDDs (Binary Decision Diagrams). There are other important and advanced chapters treating topics like interoperation with C and COM, debugging and testing F# programs, and F# library design.
All in all a very good book about the best current functional language to use in the Windows platform. I have two minor quibbles about it, though: the first few chapters about the language really could be made more interesting (although it didn't affect me much, as I only skimmed them) and some of the more exciting new features of F# could be explained in more detail. Specifically, workflows and active patterns. They are quite recent additions to the language, however, and there is some additional material promised to feature in the book's site.
Anyway, I will keep this book nearby when programming in F#. It is this kind of book that you'd want to keep around, even after learning the language.
However, this book is *packed* with information. So, if you do get this book, and have difficulty...just try to write some code and re-read sections after you do some experimentation. You can't learn F# by reading about it. It is too elegant and subtle for that...you need to actually do it. So, read this book in your computer chair, not your easy chair, and TRY STUFF OUT...TAKE YOUR TIME ...there is a lot of information on each page. You'll be a better programmer in ANY language after going through this book.
I've taken a course in functional programming and so not much was new to me. Having read some of the other reviews, I realised that the book is not very friendly to people who are professional programmers with no past experience of functional programming (though you could argue that one cannot be a professional programmer without such experience!).
That said, this book covers so many different topics in addition to the core concepts of the language. This shows you, time and time again, how you can use F#. It gives you plenty of ideas. So, this book is really good, no doubt about that.
[FF] is the one that got me started, probably because I share some personality traits with the author (based on the way he writes) and that flattened the learning curve.
Then [FS] is the book that got me excited about F#'s representational power, mainly because I'm mathematically and scientifically oriented.
But from all of them, Expert F# is the one I keep coming back to and the only one that never leaves my desk.
This book is hands down the best reference material available. You will find information in this book that you won't find anywhere else, not even in the language's draft specification (which is still work in progress).
If you are going to be doing serious F# development you'll need this book, bottom line.
Regardless, this book covers the many aspects of F# and is the best general resource on F# so far.
Genuinely interesting, the code samples never appear contrived, as is usually the case in a text presenting a language. Actually, Expert F# goes well beyond teaching F#: it is a compelling demonstration of effective functional programming and I am sure I've grown as a programmer by reading it. It's also a book I've found myself coming back to, gaining new insights at each careful reading.
My favorite chapter is Introducing Language-Oriented Programming (ch.9), which is packed with fascinating examples: probabilistic workflows, schema compilation by reflecting on types, and using F# quotations for error estimation (though see a correction to the math here: http://cs.hubfs.net/forums/5508/ShowThread.aspx), to name just the three most striking.
In short, I enthusiastically recommend Expert F#, specially if your task requires you to program on the .NET platform. Though C# is OK, F# is more elegant, more fun & more productive -- you won't be looking back.
With F# running on the .NET framework, you immediately get seamless integration with all the other .NET languages and access to tons of existing .NET libraries. Multi-threaded programming is becoming more and more important and F# has many features which aid the developer in writing massively parallel applications. Immutability is a very powerful feature and definitely frees the developer from using locks to access shared data. One of the best features of F# is the asynchronous workflow (Chapter 13) which allows you to describe your asynchronous computations without worrying about threading issues.
Expert F# provides a brief overview of functional programming and imperative/object-oriented programming with F#. Experienced developers should have no problem picking up F# concepts. If you are a beginner, I suggest you get an introduction to functional programming via the web or books before you dive into this book.
The book also introduces you to concepts such as language oriented programming, which allows you to create a somewhat "mini language" which you would then use to write a program. A chapter on working with symbolic representations explains how to use F# for processing various expressions. There is also a chapter on lexing and parsing with F# which you can use to create your own languages. Other parts of the book also cover how to work with data, building web applications, interoperability, debugging and testing.
Overall, this book is great reference and also great to learn from. I read the book cover to cover and understood most of the concepts (I'm not a very experienced programmer). After reading the book I started to write simple programs, trying to use many of the F# features, to really learn the language and use the book as a reference. This is the first great F# reference I found, other books that I've read were very introductory. I really like this book because it covers a lot of topics which really shows a variety of ways that F# can be used for.
Looking for a book to get started with the language, I chose Expert F#.
I found this book to be well written and concepts clearly explained.
One thing you find is that as a mixed-paradigm language, there are many different ways to attack a problem in F#.
Expert F# helps guide you through these decisions by giving suggestions on where to use functional techniques and where to use imperative programming techniques.
It also does a great job of showing how to use the existing .net libraries from F#.
My only complaint is that the book doesn't quite emphasize functional programming strongly enough. So, if you aren't familiar with functional algorithms and such you may need to supplement this text with an additional book.
Of all the computing books I've purchased over the years, I would rate this as one of the finest. It has that very rare combination of: working as reference for a language; exposing most of the "real world" uses of it; and also being a pleasure to read. I call it a pleasure, not because it has any great humour or anecdotes, but because the authors' style exposes the beauty of the subject in a way that appeals to programmers who love their craft.
As others have said, the structure of the book works very well. The first half explains all the language constructs, and the second shows the how to use the language in the .Net world - web apps, databases, etc.
What I like most about the style is that it is both succinct, and readable. One can sense the authors working to keep the book down to 600 pages, while providing the essential reference details, and sharing their most important insights into F# and software in general. They achieve this mostly through the carefully arranged examples, and informal "tips". Whenever I look at an example for a particular purpose (eg. a database interface) I see F# constructs being used that also demonstrate something else about the language - to explain all these points would make the book unmaneagable, so it's up to the reader to observe and learn as they read.
The two negative reviews of this book do make a valid point - that this book isn't good for learning functional programming. Its scope is too large to concentrate on the actual skill of writing functional programs (apart from the expert tips). If I could improve it in one way, I would have a set of sample problems at the end of each chapter, with the solutions available online.
The book also has an optional e-book for $10. I strongly recommend it. I use both the hard copy, and the e-book (but mostly the e-book).
Want to solve a complex combinatorial problem using the leveraging power of recursion? - And afraid of having stack overflow?
In F# language that is no longer an issue. Just rewrite the same algorithm with left recursion just the way Don Syme did it and go with these tools to break through complicated combinatorial problems. That would take you a longer resolution in an iterative way.
I look forward to spend more time learning and digesting this gold-of-mine language.
This book is built primarily on the language and the effective usage of its libraries. The first 10 chapters are more based on the language, libraries and techniques that will support to develop fluently. However; the real fun starts after chapter 11, that makes to write real world programs with more advanced techniques and patterns for common tasks.The authors paid a lot of attention to cover different scenarios and problem domains, that is why symbolic representations, lexing and interoperating chapters exist.
"Expert F#" gives different approaches to solve the problems using self explanatory and terse examples. It is nice to apply some sophisticated techniques immediately in the interactive window.
My favourite chapter of the book was reactive, asynchronous and concurrent programming. Nowadays, concurrency is such a hot topic and this chapter shows how to write reactive concurrent programs using a very neat syntax that programmers could benefit.
Finally, I would strongly recommend this book whoever wants to learn functional programming and F#. Considering the productization of F#, the language will be improved more and more and this book will be the best guide to follow up with that wave.
I Strongly Suggest: do not get this older F# book. Instead get a newer F# book.
Here are your new-enough choices on Amazon today:
Smith Programming F#: A comprehensive guide for writing simple code to solve complex problems (Animal Guide)
Syme Expert F# 2.0 (The Definitive Guide)
Pickering Beginning F#
Petricek Real World Functional Programming: With Examples in F# and C#
and lastly a pre-order-only until June 30: Neward Professional F# 1.0
F# is much newer than many programming languages, for example Python. At this point in Python's history, if you wanted to study Python, you could get by with a book on Python 2.x, rather than a book on current Python 3.x - in fact a lot of shops are still using Python 2.x
But nobody is using F# 1.x anymore! And here in the year 2010 you will hit many more difficulties learning F# from an old F# 1.x book than you would learning Python from an old Python 2.x book.
This 2007 book is based on early versions of F# 1.x - get a newer book unless you can find this old one for cheap on a remainder table.
My suggestion applies to all F# books: avoid the old ones unless they are on sale for really, really cheap. Specifically: Pay regular price for any F# book published after October 1, 2009. Anything older, pay only a wicked cheap price.
Today June 7, 2010 I received my pre-ordered copy of the new Don Syme F# 2.0 book Expert F# 2.0 (The Definitive Guide). A good day.
okay, try that, does not work...and wtf does "cons" mean, referenced many times in the following paragraph. But @ works.
Maybe the writers should have warned the reader "for demonstrational purposes only, do not try" or "read the documentation first".
Again is introducing '|' with the examples in the section that introduces basic list operators, without bothering to explain how '|' works. It could be a trivial operator, but the reason a reader spends on a book and not go straight to the documentation is because the book is expected to guide the reader's learning.
BTW, the "Who this book is for" section reads "We assume you have some programming knowledge and experience." Yes, C#, not F# which is why I was reading this book.
Somehow expected different from the main designer of F#, 2 co-authors, and 1 technical reviewer.
This is one of the first books to be written about F#. Taking into consideration that F# works on top of the .NET framework and all previous .NET Languages didn't include a functional language, most intended audience should be expected to have little or no background of functional programing while having a good background of imperative programming.
Functional programming is a whole new world for imperative programmers, a world with new restrictions and new ways of thinking. Unfortunately this book doesn't give a good explanation for functional programming concepts, it is explaining the language syntax most of the time. Even when explaining language syntax it is always missing things that you find explained in discussions and tutorials online. This book acts more as a syntax reference more than a book to learn from.
If you have no background about F# or functional programming then this book will not make things easy for you. You have to use another source with this book, either a series of tutorials or some articles or a discussion board.
Here is my original review:
Functional languages are "hot" because of the promise of easy multiprocessing and reduced error rates. So great, I'll buy this book and convert my C# code, so it can work with all these multi-core chips.
Be warned, this book falls short of real world examples and uses. Its examples seem more of interest to the academic community than business applications. Most if the book is of the nature, "this is what you can do" instead of "in this situation; this is the best way to do it."
It also assumes a lot of background in functional languages. Yes, it states "Expert", but really how many OCaml programmers are there? It really could use numerous examples of C# or VB code rewritten in F#.
This is not to say there is not a lot of good information here and there are not a lot of alternatives. It is nice having this information all in one place. I am still sold that F# and functional languages are the future of programming, but just be warned the learning curve will be high.
Create your own review





