F Sharp

Edit · View history

F Sharp

F Sharp (often written as F#) is a functional-first programming language that runs on the .NET Framework and the Mono platform. It was developed by Microsoft Research and later by the F Sharp Software Foundation. F# combines the expressiveness of OCaml with the extensive libraries and tooling of the .NET ecosystem. The language supports imperative and object-oriented styles as well, making it a multi-paradigm language. F# is known for its concise syntax, type inference, and strong static typing with features like discriminated unions and pattern matching.

History

F# originated from Don Syme’s work at Microsoft Research in the early 2000s. The first public release came in 2005 as part of the ML family. It was included as a first-class language in Visual Studio 2010. In 2014, the F# community formed the F Sharp Software Foundation to oversee the language’s evolution and ensure its independence from Microsoft. The language has since been released as open source under the Apache License. F# has been adopted in domains such as data science, financial modeling, and web development, particularly within the .NET ecosystem.

Features

F# provides several notable features:

The language is fully interoperable with other .NET languages such as C# and Visual Basic .NET.

Example

A simple "Hello, World" in F#:

For a more idiomatic functional example, computing the sum of a list:

These examples illustrate F#’s concise, expression-oriented syntax.

See also

External links

F Sharp Software Foundation