Stylish F#: Crafting Elegant Functional Code for .NET and .NET Core

Front Cover
Apress, Nov 29, 2018 - Computers - 396 pages

Why just get by in F# when you can program in style! This book goes beyond syntax and into design. It provides F# developers with best practices, guidance, and advice to write beautiful, maintainable, and correct code.

Stylish F# covers every design decision that a developer makes in constructing F# programs, helping you make the most educated and valuable design choices at every stage of code development. You will learn about the design of types and function signatures, the benefits of immutability, and the uses of partial function application. You will understand best practices for writing APIs to be used by F#, C#, and other languages. Each carefully vetted design choice is supported with compelling examples, illustrations, and rationales.


What You'll Learn

  • Know why, when, and how to code in immutable style
  • Use collection functions, piping, and function composition to build working software quickly
  • Be aware of the techniques available to bring error handling into the mainstream of program logic
  • Optimize F# code for maximum performance
  • Identify and implement opportunities to use function injection to improve program design
  • Appreciate the methods available to handle unknown data values
  • Understand asynchronous and parallel programming in F#, and how it differs from C# asynchronous programming


Who This Book Is For

Any developer who writes F# code and wants to write it better

 

What people are saying - Write a review

We haven't found any reviews in the usual places.

Contents

The Sense of Style
1
Designing Functions Using Types
10
Missing Data
29
Working Effectively with Collection Functions
61
Immutability and Mutation
99
Pattern Matching
119
Record Types
156
Classes
183
Programming with Functions
229
Asynchronous and Parallel Programming
251
Railway Oriented Programming
282
Performance
309
Layout and Naming
351
Summary
377
Index
385
Copyright

Other editions - View all

Common terms and phrases

About the author (2018)

Kit Eason is a software developer and educator with more than 20 years of experience. He has been programming in F# since 2011 and is employed at Perpetuum Ltd., working on an extensive network of energy-harvesting vibration sensors fitted to railway rolling stock. Kit is an avid F# user who is passionate about teaching others. He has contributed to several publications, as well as to the books Beginning F# and F# Deep Dives, both published by Apress. He often teaches and presents on F# and his popular videos appear on Lynda.com and YouTube.

Bibliographic information