Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Mastering F#

You're reading from   Mastering F# A comprehensive and in-depth guide to writing functional programs using F#

Arrow left icon
Product type Paperback
Published in Nov 2016
Publisher
ISBN-13 9781784393434
Length 264 pages
Edition 1st Edition
Languages
Arrow right icon
Authors (2):
Arrow left icon
Suhaib Fahad Suhaib Fahad
Author Profile Icon Suhaib Fahad
Suhaib Fahad
Alfonso García-Caro Núñez Alfonso García-Caro Núñez
Author Profile Icon Alfonso García-Caro Núñez
Alfonso García-Caro Núñez
Arrow right icon
View More author details
Toc

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.

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image