Jump to content

F Sharp (programming language): Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
Line 34: Line 34:
* [http://cs.hubfs.net/ hubFS: The place for F# - F# news, forums and blogs]
* [http://cs.hubfs.net/ hubFS: The place for F# - F# news, forums and blogs]
* [http://blogs.msdn.com/dsyme Don Syme's web log, a key source of information on F#]
* [http://blogs.msdn.com/dsyme Don Syme's web log, a key source of information on F#]
* [http://www.ffconsultancy.com/dotnet/fsharp/rule30 Cellular automaton demo]
* [http://www.ffconsultancy.com/dotnet/fsharp/teapot Minimal DirectX demo]
* [http://strangelights.com/fsharp/Wiki/default.aspx F# Wiki]
* [http://strangelights.com/fsharp/Wiki/default.aspx F# Wiki]
* [http://www.ffconsultancy.com/dotnet/fsharp/raytracer Ray tracer]
* [http://www.ffconsultancy.com/dotnet/fsharp/raytracer Ray tracer]

Revision as of 13:13, 12 March 2007

#

F# (pronounced F sharp) is a functional and object oriented programming language for the Microsoft .NET platform. It is typesafe, efficient, functional, object-oriented and type-inferred. A strength of F# is its setting within .NET. A key design aim is seamless .NET interoperability, 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 themselves (e.g. DirectX, Windows Forms, and ASP.NET, as well as alternatives like Gtk#). A Visual Studio plugin provides a graphical development environment, including features such as background type-checking with feedback under the mouse, which is extremely helpful for those unfamiliar with type inference.

F# is developed by Microsoft Research, and has a core language that is similar to that of the Caml language: both are members of the ML programming language family.

F# also provides a standard library of its own, designed to be largely compatible with the OCaml standard library. Since the two languages also share a common language subset, it can thus be quite practical to compile a single codebase with both. This enables core Caml code to be ported to the .NET world, and core F# code to run with OCaml. Maintaining this basic compatibility is one of the primary goals of the project.

As a research project, F# demonstrates how .NET enables interoperability between different programming paradigms. It 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.

As of June 2006, F# was in the beta stage of development.

A very small sample follows:

open System.Windows.Forms
let form = new Form(Visible=true, TopMost=true, Text="Welcome to F#")

let x = 3 + (4 * 5)
do form.Text <- (if x = 23 then "Correct!" else "incorrect")

F# is compatible with the XNA Game Studio Express product, which permits construction of games for Windows and for the Xbox 360.

See also