Chapter 4. Imperative Programming in F#
In this chapter, you will learn how to use control structures, more idiomatic .NET with F#, interfacing with C#, and generics. The following are the topics that we will cover:
- Working with classes
- Control structures
- Operator overloading
- Interoperating with C#
- Extension methods
- Using LINQ in F#
As a developer, we also need to think of exposing functionalities from F# libraries to be used with C# or other .NET languages. In a team, not every member will be using F# and because of that, we will write wrapper functionalities or expose the F# code in a way that's more consumable in C#. And sometimes, mutable code inside of F# is used for performance-oriented programs; just like we discussed in the previous chapter, in some cases, not all data structures can be used in an immutable way because of memory and performance. And we will resort to using imperative ways to deal with such scenarios.