© The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2022
K. EasonStylish F# 6https://doi.org/10.1007/978-1-4842-7205-3_2

2. Designing Functions Using Types

Kit Eason1  
(1)
Farnham, Surrey, UK
 

When you remove layers, simplicity and speed happen.

—Ginni Rometty, CEO, IBM

Object-Oriented (OO) programming is currently the dominant design approach in almost all software development. In OO, the natural unit of work is, unsurprisingly, the “object” or “class,” and design effort is focused on defining classes that have the right shapes, behaviors, and relationships for the tasks at hand. In F#, by contrast, the natural units of work are types, which describe the shape of data, and functions, units of code that take some ...

Get Stylish F# 6: Crafting Elegant Functional Code for .NET 6 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.