Part 3. Advanced F# programming techniques

 

In part 2, we talked about functional concepts common to most functional languages. You could now say that you understand functional programming in the same way you can say you’re familiar with OOP after reading about encapsulation, inheritance, and polymorphism. You’d still need to learn a few other things before you’d be an effective object-oriented developer, and functional programming in F# is no different.

In the same way that there are specific features in every object-oriented language, there are useful features in F# that aren’t commonly available in other functional languages. The first example of this is in chapter 9 when we talk about object types and members. F# is a first-class citizen in the .NET world and allows us to both use and declare standard .NET objects. We’ll look at how to encapsulate standard functional code into objects, which is often the next step in the iterative development style. Objects provide a better way to structure your code, and make it easy to use F# functionality from C#.