FACTOID # 57: In 2002, every 1000 Swedes made a bus.
 
 Home   Encyclopedia   Statistics   Countries A-Z   Flags   Maps   Education   Forum   FAQ   About 
 
 
 
WHAT'S NEW
RECENT ARTICLES
More Recent Articles »
 

SEARCH ALL

FACTS & STATISTICS    Advanced view

Search encyclopedia, statistics and forums:

 

 

(* = Graphable)

 

 


Encyclopedia > F sharp
F#
Paradigm multi-paradigm: imperative, functional, object-oriented
Appeared in 2005 (last revised 2007)
Designed by Microsoft Research
Developer Microsoft Research
Latest release 1.9.2.9/ July 31, 2007
Typing discipline static, strong, inferred
Influenced by Objective Caml, C#
OS Cross-platform (.NET Framework, Mono)
License Microsoft Research Shared Source license agreement ("MSR-SSLA")
Website Microsoft Research's website for F#

F# (pronounced "F sharp") is a functional and object oriented programming language for the Microsoft .NET platform. 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#. So, the main F# libraries are the .NET libraries themselves (e.g. 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 pointing device, which assists with type inference. Fa Dièse or F♯ (F sharp) is the seventh semitone of the solfege. ... A programming paradigm is a paradigmatic style of programming (compare with a methodology, which is a paradigmatic style of doing software engineering). ... This does not cite any references or sources. ... In computer science, imperative programming, as opposed to declarative programming, is a programming paradigm that describes computation in terms of a program state and statements that change the program state. ... Functional programming is a programming paradigm that treats computation as the evaluation of mathematical functions and avoids state and mutable data. ... Object-oriented programming (OOP) is a programming paradigm that uses objects and their interactions to design applications and computer programs. ... Year 2005 (MMV) was a common year starting on Saturday (link displays full calendar) of the Gregorian calendar. ... Year 2007 (MMVII) is the current year, a common year starting on Monday of the Gregorian calendar and the AD/CE era in the 21st century. ... Microsoft Research (MSR) is a division of Microsoft created in 1991 for researching various computer science topics and issues. ... For other uses, see Software developer (disambiguation). ... Microsoft Research (MSR) is a division of Microsoft created in 1991 for researching various computer science topics and issues. ... A software release refers to the creation and availability of a new version of a computer software product. ... is the 212th day of the year (213th in leap years) in the Gregorian calendar. ... Year 2007 (MMVII) is the current year, a common year starting on Monday of the Gregorian calendar and the AD/CE era in the 21st century. ... In computer science, a type system defines how a programming language classifies values and expressions into types, how it can manipulate those types and how they interact. ... On computer science, a datatype (often simply type) is a name or label for a set of values and some operations which can be performed on that set of values. ... In computing, strongly-typed, when applied to a programming language, is used to describe how the language handles datatypes. ... Type inference is a feature present in some strongly statically typed programming languages. ... Objective Caml (OCaml) is the main implementation of the Caml programming language, created by Xavier Leroy, Jérôme Vouillon, Damien Doligez, Didier Rémy and others in 1996. ... The title given to this article is incorrect due to technical limitations. ... An operating system (OS) is the software that manages the sharing of the resources of a computer and provides programmers with an interface used to access those resources. ... A cross-platform (or platform independent) programming language, software application or hardware device works on more than one system platform (e. ... The Microsoft . ... Mono is a project led by Novell (formerly by Ximian) to create an Ecma standard compliant . ... A software license is a legal agreement which may take the form of a proprietary or gratuitous license as well as a memorandum of contract between a producer and a user of computer software. ... A website (alternatively, Web site or web site) is a collection of Web pages, images, videos or other digital assets that is hosted on one or several Web server(s), usually accessible via the Internet, cell phone or a LAN. A Web page is a document, typically written in HTML... Functional programming is a programming paradigm that treats computation as the evaluation of mathematical functions and avoids state and mutable data. ... In computer science, object-oriented programming, OOP for short, is a computer programming paradigm. ... A programming language is an artificial language that can be used to control the behavior of a machine, particularly a computer. ... Microsoft . ... This API is a part of . ... ASP.NET logo ASP.NET is a web application framework marketed by Microsoft that programmers can use to build dynamic web sites, web applications and XML web services. ... Gtk#, a GUI Toolkit, is a set of . ... Microsoft Visual Studio is a series of IDEs by Microsoft. ... For other uses, see Plug in. ... An Apple pro mouse A pointing device is any computer hardware component (specifically human interface device) that allows a user to input spatial (ie, continuous and multi-dimensional) data to a computer. ... Type inference is a feature present in some strongly statically typed programming languages. ...


F# was initially developed by Microsoft Research, but now is being developed by Microsoft developer division, after it was announced on October 17, 2007 that F# will be productized as a fully integrated language in Visual Studio[1]. The latest released version, 1.9.2.9, was released on July 31, 2007. Microsoft Research (MSR) is a division of Microsoft created in 1991 for researching various computer science topics and issues. ... Microsoft Corporation, (NASDAQ: MSFT, HKSE: 4338) is a multinational computer technology corporation with global annual revenue of US$44. ... is the 290th day of the year (291st in leap years) in the Gregorian calendar. ... Year 2007 (MMVII) is the current year, a common year starting on Monday of the Gregorian calendar and the AD/CE era in the 21st century. ... Microsoft Visual Studio is a series of IDEs by Microsoft. ... is the 212th day of the year (213th in leap years) in the Gregorian calendar. ... Year 2007 (MMVII) is the current year, a common year starting on Monday of the Gregorian calendar and the AD/CE era in the 21st century. ...


The core language is similar to that of the Objective Caml language: both are members of the ML programming language family. Like the Scala programming language, it implements a functional programming language on top of a platform originally designed for object-oriented programming paradigm. Objective Caml (OCaml) is the main implementation of the Caml programming language, created by Xavier Leroy, Jérôme Vouillon, Damien Doligez, Didier Rémy and others in 1996. ... ML is a general-purpose functional programming language developed by Robin Milner and others in the late 1970s at the University of Edinburgh, whose syntax is inspired by ISWIM. Historically, ML stands for metalanguage as it was conceived to develop proof tactics in the LCF theorem prover (the language of... Scala is a multi-paradigm programming language designed to express common programming patterns in a concise, elegant, and type-safe way. ...


There is a standard library for F#, 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. A programming paradigm is a paradigmatic style of programming (compare with a methodology, which is a paradigmatic style of doing software engineering). ... This article is about the function transformation technique. ...

Contents

Applications

The F# programming language has many applications ranging from scripting to cross-platform application development.


Stephen Tse at University of Pennsylvania is developing Fjavac[2], a Java 5 compiler. Fjavac is developed in OCaml, but can be cross-compiled with F# on both Microsoft.NET and Mono.


The properties of the F# language and environment make it an ideal platform for scientific computing, filling the gap between low-level but high-performance numerical languages like Fortran and high-level but slow languages like Mathematica. F# provides the performance of a compiled language (typically close to that of C#)[3] with the sophisticated language features of high-level languages, including safety, static typing, pattern matching, views, higher-order functions and currying. Fortran (previously FORTRAN[1]) is a general-purpose[2], procedural,[3] imperative programming language that is especially suited to numeric computation and scientific computing. ... For other uses, see Mathematica (disambiguation). ... The title given to this article is incorrect due to technical limitations. ...


The F# environment includes the ability to run interactive sessions, allowing users to run pieces of code at will, collecting and analysing the results without having to compile whole programs. Moreover, visualizations can be spawned from interactive sessions, giving F# the essential functionality of many expensive technical computing environments.


F# also provides access to a foreign function interface, allowing libraries such as LAPACK and FFTW to be used with only a small amount of binding code.[citation needed] LAPACK, the Linear Algebra PACKage, is a software library for numerical computing written in Fortran 77. ... FFTW, for Fastest Fourier Transform in the West, is a software library for computing discrete Fourier transforms (DFTs), developed by Matteo Frigo and Steven G. Johnson at the MIT Laboratory for Computer Science. ...


Examples

A few small samples follow:

 (* This is a comment *) (* Sample hello world program *) printf "Hello World!" 
 #light open Microsoft.FSharp.Collection.List (* print a list of numbers recursively *) let rec printlist lst = (* When using "#light", you must indent with 4 spaces *) if lst = [] then () else printf "%dn" (nth lst 0) printlist (tl lst) (* Same thing, using matching against list elements *) let rec printlist l = match l with | [] -> () | h :: t -> printfn "%A" h printlist t 
 #light (* Fibonacci Number formula *) let rec fib n = match n with | 0 -> 0 | 1 | 2 -> 1 | n -> (fib (n - 1)) + (fib (n - 2)) (* Print even fibs *) [1 .. 10] |> List.map (fun n -> fib n) |> List.filter (fun n -> (n mod 2) = 0) |> printlist (* Same thing, using Comprehension syntax *) [ for i in 1..10 do let r = fib i if r % 2 = 0 then yield r ] |> printlist 
 #light (* Sample Windows Forms Program *) (* We need to open the Windows Forms library *) open System.Windows.Forms (* Create a window and set a few properties *) let form = new Form(Visible=true, TopMost=true, Text="Welcome to F#") (* Create a label to show some text in the form *) let label = let temp = new Label() let x = 3 + (4 * 5) (* Set the value of the Text*) temp.Text <- sprintf "x = %d" x (* Remember to return a value! *) temp (* Add the label to the form *) do form.Controls.Add(label) (* Finally, run the form *) do Application.Run(form) 

F# is compatible with the XNA Game Studio Express product, which permits construction of games for Windows and for the Xbox 360. Microsoft XNA (XNAs Not Acronymed[1]) is a set of tools, complete with a managed runtime environment, provided by Microsoft that facilitates computer game design, development and management. ...


See also

C# (pronounced see-sharp) is an object-oriented programming language developed by Microsoft as part of their . ... Objective Caml (OCaml) is a general-purpose programming language descended from the ML family, created by Xavier Leroy, Jérôme Vouillon, Damien Doligez, Didier Rémy and others in 1996. ...

References

  1. ^ S. Somasegar. F# - A functional Programming Language. Retrieved on 2007-10-18.
  2. ^ http://www.cis.upenn.edu/~stse/javac/
  3. ^ http://research.microsoft.com/fsharp/fsharp.aspx

Year 2007 (MMVII) is the current year, a common year starting on Monday of the Gregorian calendar and the AD/CE era in the 21st century. ... is the 291st day of the year (292nd in leap years) in the Gregorian calendar. ...

Books

Three books on F# are due to be published in 2007, including the first formal description of the language by its creator.


External links


  Results from FactBites:
 
F Sharp programming language - Wikipedia, the free encyclopedia (378 words)
F# (pronounced F sharp) is a mixed functional and object oriented 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 Caml language (itself a member of the ML programming language family).
As of June 2006, F# was in the beta stage of development.
  More results at FactBites »


 
 

COMMENTARY     


Share your thoughts, questions and commentary here
Your name
Your comments

Want to know more?
Search encyclopedia, statistics and forums:

 


Lesson Plans | Student Area | Student FAQ | Reviews | Press Releases |  Feeds | Contact
The Wikipedia article included on this page is licensed under the GFDL.
Images may be subject to relevant owners' copyright.
All other elements are (c) copyright NationMaster.com 2003-5. All Rights Reserved.
Usage implies agreement with terms, 1022, m