F Sharp (programming language)

This is an old revision of this page, as edited by 62.253.128.12 (talk) at 21:17, 4 August 2005. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

F# (pronounced F sharp) is a mixed functional and imperative programming language for the Microsoft .NET platform. F# was developed by Don Syme at Microsoft Research, and has a core language that is similar to that of the Ocaml language (itself a member of the ML programming language family).

A strength of F# is it's setting within .NET. A key design aim is seamless .NET interop, both via direct use of .NET APIs from F# and authorship of natural .NET components in F#. Consequently, the main F# libraries are the .NET libraries (e.g. DirectX, Windows Forms, ASP.NET as well as alternatives like GTK#). A Visual Studio plugin provides a cutting edge development environment for an ML language. For starters, the background type-checking with feedback under the mouse are invaluable especially for those learning a language with type inference.

OCaml and 'F# ' share a common language subset and it is practical to cross compile significant codes between the two. This enables CAML codes to port to the .NET world and core F# codes to run with OCAML. Core CAML compatability is taken seriously.

F# as a research project demonstrates how .NET enables interoperability between different programming paradigms. F# showcases a set of extensions to .NET's intermediate language IL, called ILX, which demonstrate how a strict curried functional language may be compiled efficiently.

F# is in the beta stage of development. (June 2005).

An example follows:

let x = 3 + (4 * 5)
let res = (if x = 23 then "correct" else "incorrect")