[11] F# is a fully supported language in Visual Studio[12] and JetBrains Rider.
[13] Plug-ins supporting F# exist for many widely used editors including Visual Studio Code, Vim, and Emacs.
The language was originally designed and implemented by Don Syme,[5] according to whom in the fsharp team, they say the F is for "Fun".
For functional programming, F# provides tuple, record, discriminated union, list, option, and result types.
[53] F# support for imperative programming includes Values and record fields can also be labelled as mutable.
For example, here is a class with a constructor taking a name and age, and declaring two properties.
[55] An asynchronous workflow is defined as a sequence of commands inside an async{ ... }, as in The let!
[55] Since version 6.0, F# supports creating, consuming and returning .NET tasks directly.
The F# type system supports units of measure checking for numbers.
This allows the compiler to check that arithmetic involving these values is dimensionally consistent, helping to prevent common programming mistakes by ensuring that, for instance, lengths aren't mistakenly added to times.
Similarly, definitions labelled with the [
[62] In F# 3.0 the F# quotation and computation expression features are combined to implement LINQ queries.
[64] F# supports a variation of the actor programming model through the in-memory implementation of lightweight asynchronous agents.
For example, the following code defines an agent and posts 2 messages: F# is a general-purpose programming language.
[69] F# can be used together with the Visual Studio Tools for Xamarin to develop apps for iOS and Android.
Among others, F# is used for quantitative finance programming,[70] energy trading and portfolio optimization,[71] machine learning,[72] business intelligence[73] and social gaming on Facebook.
F#'s scripting ability and inter-language compatibility with all Microsoft products have made it popular among developers.
[76] The F# open-source community includes the F# Software Foundation[10] and the F# Open Source Group at GitHub.
[11] Popular open-source F# projects include: F# features a legacy "ML compatibility mode" that can directly compile programs written in a large subset of OCaml roughly, with no functors, objects, polymorphic variants, or other additions.
A Person class with a constructor taking a name and age and two immutable properties.
A simple example that is often used to demonstrate the syntax of functional languages is the factorial function for non-negative 32-bit integers, here shown in F#: Iteration examples: Fibonacci examples: A sample Windows Forms program: Asynchronous parallel programming sample (parallel CPU and I/O tasks):