Dive C0.1.3
F# is born
OCaml's core, retargeted to a managed runtime — the ML tradition, on .NET.
The line reaches the present in Don Syme's work at Microsoft Research in Cambridge. The F# project began around 2002 with a clear conception: OCaml for .NET — the ML core and syntax, retargeted to the Common Language Runtime, with full access to the .NET platform. This dive covers that founding idea, the syntax choices that smoothed it, and the road to F#'s first productised release in Visual Studio 2010.
Don Syme, generics, and the founding idea
Don Syme led the design of F# at Microsoft Research, Cambridge. He came to it from a closely related piece of work: with Andrew Kennedy, Syme had designed and built generics for .NET, which shipped with real runtime support in .NET 2.0 in 2005. That runtime support for parametric types is part of why F# can compile its ML-style generics efficiently rather than erasing them.
F# was conceived, in Syme's account, as OCaml for .NET: early F# was substantially compatible with OCaml's core, so a large class of OCaml programs could compile and run on the CLR. The aim was a functional-first but pragmatic language — functional by default, with full .NET interop and objects available when a problem calls for them.
A design slogan that runs through F#: make illegal states unrepresentable — model the domain so the type system rules out the states a program should never reach. The next chapters of the course build on exactly this.
OCaml beside F#: the shared core
Because F# started from OCaml's core, much of the everyday surface is the same — and where it differs, the difference usually buys F# something: lighter syntax, the pipe idiom, or the .NET platform. Select a feature to see its OCaml form beside its F# form, with one line on what F# kept or changed.
A feature in both languages · select one
OCaml
let add x y = x + y
F#
let add x y = x + y
F# is OCaml's core, plus the .NET platform. The everyday shape carries over; the changes add the pipe, lighter syntax, and a runtime full of libraries to reach.
OCaml
A typed, functional ML dialect with records, unions, and a fast compiler — but no .NET.
F#
The same core on the CLR: [1; 2; 3] |> List.map f and any .NET API, in one language.
#light syntax, and the road to release
Early F# offered the verbose OCaml-style syntax, then added #light
— the offside-rule, indentation-aware syntax that drops much of the punctuation and became the default way
to write F#. It is why idiomatic F# reads cleanly, closer to the layout of the ML family than to the braces
of C-style languages.
The releases came in steps. F# 1.0 arrived around 2005 from Microsoft Research. The first productised, first-class release was F# 2.0, shipped in Visual Studio 2010 with full tooling. Later, F# 3.0 (2012) introduced type providers — a mechanism for the compiler to surface an external data source as typed code, an F# innovation rather than an inheritance.
F#, in steps
The line, completed
The module closes where it set out to arrive. The λ-calculus made functions the unit of computation; LISP made them data; the ML family made them typed without forcing the types to be written; and F# put that whole inheritance — OCaml's core — on the .NET runtime, reachable from any .NET library. Each trait F# is known for has a date and a source on this line.
That is the language lineage. The companion module, C0.2, follows the other thread the chapter opened: the .NET runtime itself — the CLR, the move to cross-platform .NET, and the open-source turn that carried F# to a wider community.
References
Sources
- Don Syme et al. — The Early History of F# — the primary account of F#'s design, its OCaml roots, and its releases.
- Microsoft — F# documentation — the language guide, syntax, and type providers.
- Microsoft — .NET documentation — .NET generics, the CLR, and the platform F# targets.
Related in this course
- C0.1.2 — The ML family — the OCaml core F# starts from.
- C0.1 — The ML lineage — the module hub and its three dives.
- C0 — History — the chapter, and the companion runtime module.