Summary :F# is a new language that is coming in the pipe of Microsoft for the Visual Studio platform. It aims to tackle the functional programming paradigm eventhough it is possible to use the imperative or object oriented programming.Robert Pickering starts his book by explaining the basics of F#, how to get and how to use the tools. Then, the book describes the F# syntax to be used in the three language paradigm, functional programming, imperative programming and finally object oriented programming. Among other things, the notion of type inference is presented. Once the syntax is presented, the book describes the way to develop web, windows or even WPF applications using the .NET framework. Data access is also addressed using the current technologies available, such as ADO.NET or LINQ. Then, a quick look at DSLs, compilation and code generation is given, presenting the lex and yacc tools coming with the language. Finally, a full chapter is dedicated to the interoperability between .NET and F#, because even if F# is based on the CLI, the language introduces several types that are not available in the other .NET languages (C# or VB.NET).
Review :Discovering a new language is really interesting and with F#, it is the occasion to see a new paragigm, functional programming. In really short, with F#, everything is a value, even a function. It means that you can use a function as a function parameter. The concept of type inference is also very attracting. The book is very easy to understand and a lot of little examples are explained in details, making the reading very fast. The first half of the book is dedicated to the language itself. The second half is more on using the .NET framework and I would say that it is the less interesting of the book. Indeed, during the first part, you have came across various examples using types and classes of the framework and user interface development being web or windows, or data access meaning that the second part does not bring a lot a information. Once you know these topics from the .NET documentation or from another book and once you have read how to access the .NET BCL from F#, then this part is pretty straightforward and not really useful. Moreover, the examples used to depict the topics are more explaining how to use the BCL classes than the language itself. Nevertheless, the last parts discussing the interoperability and the possibility of generating DSLs are more interesting.My final words are that it is a very intersting book if you want to see another land (functional programming). Unfortunately, on my bookshelf, I also have "Expert F#" that I just opened to see what is inside and I saw that it takes the explanations and descriptions of the language from the beginning. If I had knew that before, maybe I would have bought this one instead. So, if the goal is just to scratch the surface of F#, "Foundations of F#" is the best suited, otherwise, if the goal is to go really deeper in the topic, then prefer "Expert F#" (a review of that one will be posted).
The opinions expressed herein are my own personal opinions and do not represent
my employer's view in any way.