F# Overview


What is F#?

F# is a functional-first, general-purpose, strongly typed, multi-paradigm programming language that encompasses functional, imperative, and object-oriented programming methods.

  • It is most often used as a cross-platform Common Language Infrastructure (CLI) language on .NET Core.
  • It can also generate JavaScript and graphics processing unit (GPU) code.

Why F#?

F# was initially available only on Windows as a Microsoft Research project, but it is now a first-class language on several platforms.

  • You can use F# on Windows, Mac, and Linux with tool support in Visual Studio, Xamarin Studio, MonoDevelop, Emacs, and on Android and iOS devices and the Web using HTML5.
  • In addition to general-purpose programming, F# applies to GPU code, big data, games, and much more.
  • F# can be used as a scripting language as well as a programming language.
  • Unlike JavaScript, Ruby, and Python, F# is strongly typed, not dynamically typed. Unlike C and C++, which are also strongly typed, but require all types to be declared, F# performs type inference whenever possible.

History

F# is developed by the F# Software Foundation, Microsoft, and open contributors. The open-source, cross-platform compiler for F# is available from the F# Software Foundation.

The language has gone through several versions.

Version Date Platforms Runtime
F# 1.x May 2005 Windows .NET 1.0 - 3.5
F# 2.0 April 2010 Linux, macOS, Windows .NET 2.0 - 4.0, Mono
F# 3.0 August 2012 Linux, macOS, Windows, JavaScript, GPU .NET 2.0 - 4.5, Mono
F# 3.1 October 2013 Linux, macOS, Windows, JavaScript, GPU .NET 2.0 - 4.5, Mono
F# 4.0 July 2015
F# 4.1 March 2017 Linux, macOS, Windows, JavaScript, GPU .NET 3.5 - 4.6.2, .NET Core, Mono
F# 4.5 August 2018 Linux, macOS, Windows, JavaScript, GPU .NET 4.5 - 4.7.2, .NET Core SDK 2.1.400
F# 4.7 September 2019
F# 5.0 Nov 2020 Linux, macOS, Windows, JavaScript, GPU .NET Core SDK 5.0.100

Features

F# has numerous features, and some of them are as follows:

  • Lightweight syntax
  • Immutable by default
  • Type inference and automatic generalization
  • First-class functions
  • Powerful data types
  • Pattern matching
  • Async programming

Application Areas

  • Making scientific model
  • Mathematical problem solving
  • Artificial intelligence research work
  • Financial modeling
  • Graphic design
  • CPU design
  • Compiler programming
  • Telecommunications