# F Sharp (programming language)

**F#** is a functional-first, statically typed programming language for the .NET platform, combining functional, imperative, and object-oriented styles with type inference, and it is partly inspired by OCaml.<sup>[1](https://fsharp.github.io/fslang-spec/introduction/)</sup> F# was designed by Don Syme at [Microsoft Research](https://www.edgepedia.org/microsoft-research), Cambridge, first released in 2005, and is today an open-source language under the Apache 2.0 license, developed as a collaboration between the .NET Foundation, the F# Software Foundation, and contributors including Microsoft.<sup>[2](https://www.microsoft.com/en-us/research/project/f-at-microsoft-research/)</sup><sup> • </sup><sup>[3](https://devblogs.microsoft.com/dotnet/introducing-fsharp-10/)</sup><sup> • </sup><sup>[4](https://www.javacodegeeks.com/2026/09/f-the-functional-language-enterprises-could-actually-adopt.html)</sup> F# compiles to the same intermediate language as C# and ships in the same .NET SDK, so F# and C# code interoperate in one solution with no adapter layer.<sup>[4](https://www.javacodegeeks.com/2026/09/f-the-functional-language-enterprises-could-actually-adopt.html)</sup>

| Key fact | Detail |
|---|---|
| Definition | Type-safe, type-inferred functional/imperative/object-oriented language for .NET and ECMA-335 CLI implementations, partly inspired by OCaml<sup>[1](https://fsharp.github.io/fslang-spec/introduction/)</sup> |
| Origin | Created by Don Syme at Microsoft Research, Cambridge; core F# 1.0 features developed 2004–2007; F# 2.0 released April 2010<sup>[5](https://fsharp.org/history/hopl-final/hopl-fsharp.pdf)</sup><sup> • </sup><sup>[6](https://dsyme.net/2010/04/12/f-2-0-released/)</sup> |
| Type inference | Hindley-Milner inference, algorithmic and left-to-right; bindings, parameters, and return values usually need no annotations<sup>[7](https://devblogs.microsoft.com/dotnet/nullable-reference-types-in-fsharp-9/)</sup><sup> • </sup><sup>[5](https://fsharp.org/history/hopl-final/hopl-fsharp.pdf)</sup> |
| Signature features | Discriminated unions, pattern matching, records, options, immutability by default, units of measure with no runtime cost<sup>[1](https://fsharp.github.io/fslang-spec/introduction/)</sup><sup> • </sup><sup>[8](https://www.infoq.com/articles/fsharp-community-survey-2016/)</sup> |
| Interop | Compiles to ordinary .NET assemblies; calls any CLI library and is callable from C#/VB; Task interop via Async.AwaitTask and Async.StartAsTask<sup>[1](https://fsharp.github.io/fslang-spec/introduction/)</sup><sup> • </sup><sup>[9](https://johal.in/15-vs-async-throughput-2026-net-11-web)</sup> |
| Current releases | F# 9 with .NET 9 (nullable reference types); F# 10 with .NET 10 and Visual Studio 2026<sup>[10](https://learn.microsoft.com/en-us/dotnet/fsharp/whats-new/fsharp-9)</sup><sup> • </sup><sup>[11](https://learn.microsoft.com/en-us/dotnet/fsharp/whats-new/fsharp-10)</sup> |
| Adoption | 1.2% of respondents in the 2026 Stack Overflow survey (172 of the surveyed developers), against C#'s 27.1%<sup>[12](https://survey.stackoverflow.co/2026/technology/data/languages)</sup><sup> • </sup><sup>[13](https://survey.stackoverflow.co/2026/technology)</sup> |

## History

F# began as an implementation of the core of Caml for .NET with cross-language extensions. The core features of F# 1.0 were developed from 2004 to 2007, followed by Microsoft's productization of the language in 2007–2010 and the release of F# 2.0.<sup>[5](https://fsharp.org/history/hopl-final/hopl-fsharp.pdf)</sup> Syme's account frames F# as one of many responses to the "object-oriented tidal wave" of the mid-1990s, developed as a practical "functional-first" language as functional programming converged with industry concerns in the 2000s.<sup>[14](https://www.microsoft.com/en-us/research/video/ml-2021-keynote-narratives-and-lessons-from-the-early-history-of-f/)</sup>

**Key 2006 additions** included the indentation-aware "light" syntax, a treatment of subtyping within Hindley-Milner type inference (algorithm inferring expression types without annotations), runtime meta-programming via quotations, F# Interactive (a REPL), initial [Visual Studio](https://www.edgepedia.org/visual-studio) tooling, bootstrapping, and execution on Linux via Mono.<sup>[5](https://fsharp.org/history/hopl-final/hopl-fsharp.pdf)</sup> F# 2.0 shipped in April 2010 as a functional and object-oriented language for .NET, with applications noted in financial services, data analytics, games, sciences, and machine learning.<sup>[6](https://dsyme.net/2010/04/12/f-2-0-released/)</sup> The language is open source under the Apache 2.0 license and available across multiple platforms through the F# Software Foundation, a US non-profit.<sup>[2](https://www.microsoft.com/en-us/research/project/f-at-microsoft-research/)</sup><sup> • </sup><sup>[5](https://fsharp.org/history/hopl-final/hopl-fsharp.pdf)</sup>

## Language design and features

F# provides tuples, options, records, unions, and sequence expressions as core tools for modeling and manipulating data, with indentation-aware lightweight syntax.<sup>[1](https://fsharp.github.io/fslang-spec/introduction/)</sup> In the 2016 community survey, immutability by default was the most-cited favorite feature (78% of respondents), followed by type inference and the piping idiom (69% each) and discriminated unions (65%).<sup>[8](https://www.infoq.com/articles/fsharp-community-survey-2016/)</sup>

**Type inference.** As most other ML-family languages, F# uses Hindley-Milner type inference, so users typically need not annotate the types of bindings, parameters, or return values.<sup>[7](https://devblogs.microsoft.com/dotnet/nullable-reference-types-in-fsharp-9/)</sup> For arithmetic the language infers int by default, the last expression in a function body is the return value, and automatic generalization makes declarations generic through type variables such as 'a and 'b.<sup>[1](https://fsharp.github.io/fslang-spec/introduction/)</sup> One design decision broke with OCaml and a long ML tradition: F# uses inferred type information in name resolution, which makes inference algorithmic and left-to-right and occasionally requires type annotations; the pipeline operator's importance stems directly from this left-to-right propagation of type information.<sup>[5](https://fsharp.org/history/hopl-final/hopl-fsharp.pdf)</sup> F#'s type inference is based on Hindley–Milner but includes a treatment of subtyping; .NET interoperation can involve OOP subtyping.<sup>[15](https://alexn.org/blog/2025/11/01/scala-vs-fsharp/)</sup>

**Discriminated unions** are one of the language's [union types](https://www.edgepedia.org/union-type) for modeling data, paired with pattern matching.<sup>[1](https://fsharp.github.io/fslang-spec/introduction/)</sup> F# 9 added auto-generated .Is* properties for discriminated union cases, and allows fields in multiple cases of a struct discriminated union with the same name and type to share the same memory location, reducing the struct's memory footprint.<sup>[10](https://learn.microsoft.com/en-us/dotnet/fsharp/whats-new/fsharp-9)</sup>

**Units of measure.** F# applies type checking and type inference to numerically intensive domains through units-of-measure inference and checking. The Measure attribute tells the compiler that identifiers such as kg, s, and m are not types in the usual sense but are used to build units of measure, so numerical code representing physical quantities is type-checked with no loss of compiled-code performance.<sup>[1](https://fsharp.github.io/fslang-spec/introduction/)</sup>

**Parallel and reactive support.** F# is both a parallel and a reactive language, supporting multiple parallel active evaluations and pending reactions such as callbacks and agents.<sup>[1](https://fsharp.github.io/fslang-spec/introduction/)</sup> Its support for parallelism and concurrency rests on immutability and asynchronous programming, together with tools such as F# Interactive.<sup>[6](https://dsyme.net/2010/04/12/f-2-0-released/)</sup>

**Type providers.** The F# Data library integrates external structured data (XML, JSON, CSV) into F#'s static type system via type providers, using a shape-inference algorithm over sample documents; the work was formalized with a proven relative type soundness theorem, and at the time of the 2016 paper the library had over 125,000 NuGet downloads, 1,844 commits, and 44 contributors.<sup>[16](https://tomasp.net/academic/papers/fsharp-data/fsharp-data.pdf)</sup>

## Interoperability with .NET

Because F# is built on implementations of the ECMA-335 CLI, F# code can call any CLI library, and other CLI languages can use F# components.<sup>[1](https://fsharp.github.io/fslang-spec/introduction/)</sup> Because F# projects produce standard .NET assemblies, an F# service is able to invoke a C# library, while a C# project may likewise reference a component authored in F#, all within one solution and without any adapter layer.<sup>[4](https://www.javacodegeeks.com/2026/09/f-the-functional-language-enterprises-could-actually-adopt.html)</sup> F# 9 runs on the same .NET runtime as contemporary C# and can reference any C#-compiled NuGet package or project, with native Task interop via Async.AwaitTask and Async.StartAsTask allowing mixed F# and C# controllers in one [Web API](https://www.edgepedia.org/web-api).<sup>[9](https://johal.in/15-vs-async-throughput-2026-net-11-web)</sup>

Null is the classic friction point. F# is designed to avoid null, but null can creep in when interfacing with .NET libraries written in C#; historically F# chose not to sanitize .NET nulls, unlike SML.NET, which wrapped interop calls in the [Standard ML](https://www.edgepedia.org/standard-ml) option type, prioritizing interop trade-offs.<sup>[10](https://learn.microsoft.com/en-us/dotnet/fsharp/whats-new/fsharp-9)</sup><sup> • </sup><sup>[5](https://fsharp.org/history/hopl-final/hopl-fsharp.pdf)</sup> F# 9 addresses this with nullable reference types, adding the optional | null annotation to the type system, with nullability inferred for consumed API return values and written to compiled metadata readable by C#. The feature is explicitly not a replacement for Option<_>, Result<_>, or custom union types, and unlike C# the F# compiler does not implement flow analysis that derives nullability from branching constructs such as if-then-else.<sup>[7](https://devblogs.microsoft.com/dotnet/nullable-reference-types-in-fsharp-9/)</sup>

## How it compares with OCaml, Haskell, Scala, and C#

**OCaml.** F# and OCaml both descend from the ML tradition: strict by default, statically typed, inference-heavy, expression-oriented, functional-first, and practical about effects. They differ mainly in platform: F# targets the .NET runtime with NuGet and C# interop, while OCaml uses its own runtime with a native or bytecode compiler, opam, and Dune. Design ideas transfer between them, but code does not move mechanically; OCaml has a deeper module, signature, and functor culture, while F# modules are shaped by .NET boundaries such as object models, generics, attributes, and tasks.<sup>[17](https://langindex.dev/comparisons/fsharp-vs-ocaml/)</sup>

**Haskell.** Haskell is purely functional and lazy by default, and commonly uses monadic patterns to sequence side effects, in contrast to F#'s strict evaluation and pragmatic mixing of paradigms.<sup>[18](https://www.systutorials.com/syntactical-difference-among-ocaml-scala-f-and-haskell/)</sup>

**Scala.** F# does not mix functional and object-oriented paradigms as aggressively as Scala. One practical difference cited by practitioners: F# serialization has relied on runtime reflection, whereas Scala has libraries such as Circe that work entirely at compile time.<sup>[15](https://alexn.org/blog/2025/11/01/scala-vs-fsharp/)</sup>

**C#.** The two languages compile to the same assemblies, share NuGet and the .NET runtime, and can live in the same solution. F# offers records, discriminated unions, options, and pattern matching against C#'s classes, records, and nullable analysis; F# uses broad ML-family inference in ordinary code while C# uses local inference through var and target typing. A common division of labor is that C# owns framework-heavy boundaries while F# owns the rules-heavy domain core.<sup>[19](https://langindex.dev/comparisons/fsharp-vs-csharp/)</sup> The usual advice on choosing among them is to use Scala when working on the JVM, F# within .NET groups, OCaml when building compilers or doing formal verification, and Haskell for mathematically oriented work and systems needing strong typing.<sup>[18](https://www.systutorials.com/syntactical-difference-among-ocaml-scala-f-and-haskell/)</sup>

## Tooling and ecosystem

The F# compiler is open source in the dotnet/fsharp repository, whose Compiler Guide contains learning videos, architecture diagrams, and public documentation for FSharp.Compiler.Service, the compiler-as-a-library. Official NuGet releases of FSharp.Compiler.Service and FSharp.Core are synchronized with .NET SDK releases, and nightly packages publish on every successful insertion.<sup>[20](https://github.com/dotnet/fsharp/blob/main/README.md)</sup> Language features are delivered through RFCs plus implementations submitted to dotnet/fsharp, merged behind a preview flag before a language version bump; new releases typically align with a .NET and/or Visual Studio version, and the planning process is intended to be transparent and participative.<sup>[21](https://github.com/fsharp/FSharpLangDesign)</sup>

On the web side, the 2016 community survey listed popular libraries including Suave, a lightweight web server with a composable API, and FParsec, a parser-combinator library.<sup>[8](https://www.infoq.com/articles/fsharp-community-survey-2016/)</sup> Benchmark data on F# web frameworks shows wide variance: in the Web Frameworks Benchmark's F#/C# comparison, fsharp scores 10 and websharper 10.1 at the top, but frank scores 7.3, giraffe 6, falco 5, suave 3.5, and saturn 0.14, against C# entries scored 10 on the same scale.<sup>[22](https://web-frameworks-benchmark.netlify.app/result?l=fsharp%2Ccsharp)</sup>

## Adoption and use in industry

Documented application domains go back to the F# 2.0 release announcement: financial services, data analytics, games, sciences, and machine learning.<sup>[6](https://dsyme.net/2010/04/12/f-2-0-released/)</sup> In the 2016 F# community survey, 45% of respondents used F# for utilities and tools, with data analytics (21%) and web and business applications (17% each) next; 81% of F# developers also used C#, 38% [JavaScript](https://www.edgepedia.org/javascript), 19% [Python](https://www.edgepedia.org/python-programming-language), and 5% R. The share of respondents working where "everybody loves F#" grew from 8% in 2015 to 14% in 2016.<sup>[8](https://www.infoq.com/articles/fsharp-community-survey-2016/)</sup>

**The adoption gap.** In the 2026 Stack Overflow Developer Survey, F# was used by 172 respondents, 1.2%, just above OCaml at 165 (1.2%), while C# was used by 3,826 respondents, 27.1%, roughly 22 times the F# count.<sup>[12](https://survey.stackoverflow.co/2026/technology/data/languages)</sup><sup> • </sup><sup>[13](https://survey.stackoverflow.co/2026/technology)</sup> The admiration-versus-desire split is sharp: F# is admired by 49.1% of the people who use it, close to C#'s own 55.8%, but only 2.9% of all respondents want to pick it up the next year, versus 29.2% for [Rust](https://www.edgepedia.org/rust-programming-language) and 5.8% for [Elixir](https://www.edgepedia.org/elixir-programming-language).<sup>[4](https://www.javacodegeeks.com/2026/09/f-the-functional-language-enterprises-could-actually-adopt.html)</sup>

## Recent developments

**F# 9** shipped with .NET 9, introducing nullable reference types, auto-generated .Is* properties for discriminated union cases, random sampling and shuffling functions in List/Array/Seq, C# collection expression support for F# lists and sets, and field sharing for struct discriminated unions.<sup>[10](https://learn.microsoft.com/en-us/dotnet/fsharp/whats-new/fsharp-9)</sup> **F# 10** ships with .NET 10 and Visual Studio 2026 as a refinement release focused on clarity, consistency, and performance, with improvements to the language, the FSharp.Core library, and tooling; it introduces a type subsumption cache that memoizes type relationship checks to speed up type checking and IDE responsiveness, especially in projects with complex type hierarchies.<sup>[11](https://learn.microsoft.com/en-us/dotnet/fsharp/whats-new/fsharp-10)</sup><sup> • </sup><sup>[3](https://devblogs.microsoft.com/dotnet/introducing-fsharp-10/)</sup> A further F# language version is planned as the default for the .NET 11.0.200 SDK, selectable with --langversion:11.2, with preview features requiring --langversion:preview in the .NET 11.0.100 SDK.<sup>[23](https://fsharp.github.io/fsharp-compiler-docs/release-notes/Language.html)</sup>

F# web performance relative to C# varies by framework and benchmark. A May 2023 analysis of web benchmarks found F# averaging about 156k requests per second versus C#'s 134k, concluding the two languages perform about the same for similar web workloads since both run on .NET; that analysis excluded Suave and WebSharper as outliers or for lacking TechEmpower benchmarks.<sup>[24](https://hamy.xyz/blog/2023-05-csharp-vs-fsharp-performance)</sup> The Web Frameworks Benchmark, by contrast, shows wide variance among F# frameworks on the same scale as C#, with fsharp and websharper at the top but saturn and suave well below the C# entries, so no single F#-versus-C# performance conclusion holds across frameworks.<sup>[22](https://web-frameworks-benchmark.netlify.app/result?l=fsharp%2Ccsharp)</sup>

## References

1. [F# Language Specification: Introduction](https://fsharp.github.io/fslang-spec/introduction/)
2. [F# at Microsoft Research](https://www.microsoft.com/en-us/research/project/f-at-microsoft-research/)
3. [Introducing F# 10: .NET Blog](https://devblogs.microsoft.com/dotnet/introducing-fsharp-10/)
4. [F#: The Functional Language Enterprises Could Actually Adopt: Java Code Geeks](https://www.javacodegeeks.com/2026/09/f-the-functional-language-enterprises-could-actually-adopt.html)
5. [Don Syme (2020). The Early History of F#, HOPL-IV](https://fsharp.org/history/hopl-final/hopl-fsharp.pdf)
6. [F# 2.0 Released: @dsyme on software (April 2010)](https://dsyme.net/2010/04/12/f-2-0-released/)
7. [Nullable Reference Types in F# 9: .NET Blog](https://devblogs.microsoft.com/dotnet/nullable-reference-types-in-fsharp-9/)
8. [F# in Numbers: A Look at the Annual F# Survey Results: InfoQ](https://www.infoq.com/articles/fsharp-community-survey-2016/)
9. [C# 15 vs. F# 9: Async Throughput for 2026 .NET 11 Web APIs: johal.in](https://johal.in/15-vs-async-throughput-2026-net-11-web)
10. [What's new in F# 9: Microsoft Learn](https://learn.microsoft.com/en-us/dotnet/fsharp/whats-new/fsharp-9)
11. [What's new in F# 10: Microsoft Learn](https://learn.microsoft.com/en-us/dotnet/fsharp/whats-new/fsharp-10)
12. [Programming languages: Stack Overflow Developer Survey 2026](https://survey.stackoverflow.co/2026/technology/data/languages)
13. [Technology 2026: Stack Overflow Developer Survey](https://survey.stackoverflow.co/2026/technology)
14. [ML 2021 Keynote: Narratives and Lessons from The Early History of F#](https://www.microsoft.com/en-us/research/video/ml-2021-keynote-narratives-and-lessons-from-the-early-history-of-f/)
15. [Scala vs F#: Alexandru Nedelcu (2025)](https://alexn.org/blog/2025/11/01/scala-vs-fsharp/)
16. [Types from data: making structured data first-class citizens in F# (ICFP 2016)](https://tomasp.net/academic/papers/fsharp-data/fsharp-data.pdf)
17. [F# vs OCaml: LangIndex](https://langindex.dev/comparisons/fsharp-vs-ocaml/)
18. [Syntax Differences Between OCaml, Scala, F#, And Haskell: SysTutorials](https://www.systutorials.com/syntactical-difference-among-ocaml-scala-f-and-haskell/)
19. [F# vs C#: LangIndex](https://langindex.dev/comparisons/fsharp-vs-csharp/)
20. [dotnet/fsharp README](https://github.com/dotnet/fsharp/blob/main/README.md)
21. [fsharp/FSharpLangDesign: language design process](https://github.com/fsharp/FSharpLangDesign)
22. [Web Frameworks Benchmark (F#/C#)](https://web-frameworks-benchmark.netlify.app/result?l=fsharp%2Ccsharp)
23. [F# Compiler Guide: Language release notes](https://fsharp.github.io/fsharp-compiler-docs/release-notes/Language.html)
24. [Is C# faster than F#?: HAMY (May 2023)](https://hamy.xyz/blog/2023-05-csharp-vs-fsharp-performance)

---
*Topic: Encyclopedia › Technology and the built world › Computing and digital systems › Software and programming › Programming languages › Individual programming languages › Functional, logic, and array languages*

*Initially written Sep 17, 2026 · Reviewed: Sep 17, 2026; Sep 30, 2026; Oct 15, 2026 · Edited: Sep 30, 2026; Oct 15, 2026; Oct 25, 2026 · Last review: Oct 15, 2026*

*Copyright 2026 EdgeChat AI, a subsidiary of Biostate AI.*

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license
