Foreword

Don Syme

Principal Researcher and F# Designer, Microsoft Research

This book marks a transition point in the history of the F# language. From its origins as a research project at Microsoft Research, Cambridge, and its long heritage from languages such as OCaml and Haskell, F# has now emerged as a stable, efficient, and enjoyable productivity tool for compositional and succinct programming on the .NET platform. With the release of Visual Studio 2010, a whole new generation of programmers will have the language available to them as they build the future through the software they design, whether it be through beautiful code, groundbreaking software frameworks, high-performance websites, new software methodologies, better numerical algorithms, great testing, intelligent parallelization, better modelling, or any number of the other manifestations of “good programming” with F#. As the designer of F#, I am thrilled to see Chris Smith, a major contributor on the F# team, present F# in a way that is accessible to a wide audience.

F# combines the simplicity and elegance of typed functional programming with the strengths of the .NET platform. Although typed functional programming is relatively new to many programmers and thus requires some learning, it makes programming simpler in many ways. F# programs tend to be built from compositional, correct foundational elements, and type inference makes programs shorter and clearer. In this book, Chris first introduces the foundational paradigms of F#: functional programming, imperative programming, and object-oriented programming, and emphasizes how these can be used together. His focus is on simple, clear explanations of the foundational elements of the language, with an eye on the enjoyment that comes from programming in general, and programming with F# in particular.

When used at its best, F# makes things simple. For example, F# units of measure are covered in this book and are a landmark feature in the history of programming languages, taming much of the complexity of working with floating-point numbers in common application areas. Furthermore, the huge, generation-defining shift toward asynchronous and parallel processing forms part of the background to the development of F#. In this book, Chris tackles the foundations F# and .NET provide to help you work in this world. Likewise, F# has great strengths in language-oriented programming, a topic dear to Chris’s heart, and again well covered here.

Above all, F# is a practical language, and Chris has ensured that the reader is well equipped with the information needed to use the current generation of F# tools well, with a notable emphasis on F# scripting. Chris’s book describes F# “1.0” as it appears in Visual Studio 2010, the first officially supported release of the language. The F# team and I are very grateful to Chris for his contributions to the development of the language and its tools. I hope you enjoy your programming with F# as much as Chris and I have enjoyed working as part of the F# team.

Get Programming F# now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.