What Is F#?
F# is a functional-first, statically typed, open-source programming language built on the .NET platform. Created at Microsoft Research by Don Syme and first released in 2005, it draws heavily from OCaml, part of the ML family of languages. F# compiles down to the Common Intermediate Language (CIL) — the same target C# and VB.NET produce — which means F# code runs on the .NET runtime (CLR) and can call into, and be called from, any other .NET language.
Cricket analogy: F# being built on OCaml but compiling to the same CIL as C# is like a batter trained in the traditional MCC coaching manual who still walks out to bat under the exact same ICC playing conditions as everyone else in the match.
Origins and Design Philosophy
F# emerged as Microsoft's answer to bringing ML-style functional programming to enterprise .NET development, rather than as an academic research language kept separate from production systems. Don Syme's team designed it so functions are values that can be passed around, composed, and returned from other functions, and so that most bindings are immutable unless explicitly marked mutable. This 'functional-first' philosophy differs from Haskell's 'pure functional' stance — F# permits side effects and imperative code, but nudges developers toward the safer default.
Cricket analogy: F# permitting side effects while defaulting to immutability is like a captain who mostly sticks to the batting order on the team sheet but reserves the right to send a pinch hitter when the match situation demands it.
F# on the .NET Platform
Because F# targets the CLR, it has full access to the .NET Base Class Library, NuGet package ecosystem, ASP.NET Core, Entity Framework, and any C# library, with almost no friction. A team can write the data layer in C#, the domain logic in F#, and the tests in either, all within the same solution. The .NET SDK (5+, and today .NET 8/9) is cross-platform, so F# code compiled on Windows runs identically on Linux and macOS without modification.
Cricket analogy: Mixing an F# domain layer with a C# data layer in one solution is like a franchise team fielding an overseas spinner alongside a local pace battery — different origins, same scorecard.
Functional-First, Not Functional-Only
Despite its functional core, F# is genuinely multi-paradigm: it supports classes, interfaces, inheritance, and mutable state when a problem is better solved that way, such as performance-critical loops or interop with an object-oriented API. A financial trading desk, for instance, might model a domain with F#'s discriminated unions and pattern matching for correctness, while still using a mutable array and a for-loop in a hot path for raw throughput. This pragmatic blend is why companies like Jet.com (later acquired by Walmart) and G-Research have used F# in production trading and e-commerce systems.
Cricket analogy: Using a mutable array and loop in a hot path while modeling the rest with discriminated unions is like a bowler who sticks to a strict length-and-line plan all match but bowls a genuine yorker at the death when only raw pace will do.
// A pure function - no mutation, direct return
let square x = x * x
// A class - F# supports OOP when useful
type Counter(start: int) =
let mutable count = start
member this.Increment() = count <- count + 1
member this.Value = count
let c = Counter(0)
c.Increment()
c.Increment()
printfn "Squared: %d, Counter: %d" (square 5) c.ValueF# is a first-class citizen in Visual Studio, Visual Studio Code (via the Ionide extension), JetBrains Rider, and the dotnet CLI — you are never locked into a single editor or operating system.
- F# is functional-first, statically typed, and open source, created by Don Syme at Microsoft Research and released in 2005.
- It compiles to the same CIL bytecode as C#, giving it full interop with the entire .NET ecosystem and NuGet.
- Immutability is the default; mutation is explicit via the mutable keyword.
- F# is multi-paradigm — it supports object-oriented and imperative code alongside functional style.
- F# runs cross-platform on Windows, Linux, and macOS through the .NET SDK.
- It is used in production by companies including Jet.com and G-Research, especially in domains needing correctness and concise domain modeling.
Practice what you learned
1. Who created F# and where?
2. What does F# compile to?
3. What is F#'s default binding behavior?
4. Which best describes F#'s paradigm?
5. Which language family influenced F# most directly?
Was this page helpful?
You May Also Like
Installing .NET and F#
Step-by-step guide to installing the .NET SDK, setting up F# tooling, and verifying your environment with fsi and dotnet new.
Values and Immutability
How F#'s let bindings are immutable by default, how to opt into mutability, and how shadowing differs from mutation.
F# Syntax Basics
A tour of F#'s significant whitespace, function definitions, the pipe and composition operators, and basic types.
Related Reading
Related Study Notes in Programming
Browse all study notesApache Spark Study Notes
Programming · 30 topics
ProgrammingApache Flink Study Notes
Programming · 30 topics
ProgrammingHadoop Study Notes
Programming · 30 topics
ProgrammingSnowflake Study Notes
Programming · 30 topics
ProgrammingApache Airflow Study Notes
Programming · 30 topics
Programmingdbt (Data Build Tool) Study Notes
Programming · 30 topics