F# is a programming language that provides support for functional programming in addition to traditional object-oriented and imperative (procedural) programming. The Visual F# product provides support for developing F# applications and extending other .NET Framework applications by using F# code. F# is a first-class member of the .NET Framework languages and retains a strong resemblance to the ML family of functional languages.
This version of Visual F# contains the F# 4.0 version of the language.
F# supports functional programming constructs such as the following:
Functions as values, which enables flexible manipulation of functions. For more information, see Functions as First-Class Values (F#).
Function composition and pipelining, which enables you to combine functions together to create new functions and to simplify the coding of successive operations on data. For more information, see Functions (F#).
Type inference, which reduces the requirement to explicitly call out types without sacrificing type safety.
Automatic generalization, which promotes code reuse by making it easy to write code that works with a variety of different types without any additional effort.
Lambda expressions, which are important to many functional programming constructs.
Partial application of function arguments, which enables you to create new functions implicitly from existing ones. For more information, see Functions (F#).
Code Quotations, a feature that enables you to manipulate F# expressions programmatically.
F# supports object-oriented programming and .NET Framework capabilities such as the following:
The .NET Framework object model, including objects that have properties, methods, and events; polymorphism or virtual functions; inheritance; and interfaces.
Data encapsulation, or separating the public interface of a type from the implementation.
Operator overloading that works well with generics and built-in primitive types.
Type extensions, which enable you to extend an existing type easily without the additional overhead work of creating a new derived type.
Object expressions, which enable you to define small objects implicitly in expressions as needed, instead of declaring a new type and instantiating an object.
Access to the .NET Framework and any managed code assembly.
Access to native code through platform invoke.
Visual F# supports information-rich programming. This technology lets you program directly against rich spaces of data and services that often dominate enterprise and web programming today, such as databases, web services, web data feeds, and data brokers.
F# information-rich programming is code-focused and can be used in both scripts and projects. It also allows you to specify OData and SQL Server database connections directly in your code, while giving strong types with IntelliSense assistance. The mechanism is extensible, allowing you to write or reference new providers for data, code, and service technologies such as SharePoint, web ontologies, Windows Management Instrumentation (WMI), XML, and other information sources. Technically, F# information-rich programming includes the F# Type Providers mechanism, F# Query Expressions, and a set of built-in type providers for database, OData, and web service programming.
F# also supports all the common imperative programming constructs, such as branching and looping constructs.
The Visual F# product also includes a core F# library that has many useful functions and types. This includes APIs for collections such as lists, arrays, maps, sets, and sequences. The F# core library also supports reflection, events, and formatted I/O.
In addition, the core F# library includes support for asynchronous workflows to support parallel computations, and mechanisms for communicating among parallel workflows. For more information, see Asynchronous Workflows (F#), Control.Async Class (F#), and Control.MailboxProcessor<'Msg> Class (F#). Separately compiled versions of the F# Core library exist that support different versions of the .NET Framework.
The core F# library is FSharp.Core.dll. All .NET libraries can be used from F# and a vast number of .NET libraries are available from NuGet. In addition, many F#-specific libraries are also available from NuGet. The F# Software Foundation curates a list of F#-specific community libraries.
Visual F# provides an interactive window that is integrated into the Visual Studio development environment. This window enables you to enter F# code and have it immediately compiled and executed. This enables you to easily prototype code constructs and test your code while you write it. The interactive window runs the F# interactive tool, fsi.exe, which you can also run from the command line. This feature allows F# to be used as a scripting language. For more information, see F# Interactive (fsi.exe) Reference.
Integration with Visual Studio
F# is integrated with Visual Studio, and has support for the following:
IntelliSense. For more information, see Using IntelliSense.
Debugging. For more information, see Debugging in Visual Studio.
For more information, see F# Development Environment Features.
|Visual F# Development Portal||A gateway to a wide variety of information about F#.|
|Using Visual Studio to Write F# Programs||Provides information about using F# in the Integrated Development Environment (IDE), including project settings and IntelliSense.|
|F# Language Reference||Provides reference information about the F# language, including information about keywords, symbols, and operators.|
|F# Core Library Reference||Provides reference information about the F# core library, FSharp.Core.dll.|
|F# Compiler (fsc.exe) Reference||Provides information about the F# compiler, fsc.exe, including information about compiler options.|
|F# Interactive (fsi.exe) Reference||Provides information about F# Interactive, fsi.exe, including information about command-line options and diagnostic messages that are specific to F# Interactive.|
|Visual F# Samples and Walkthroughs||Provides links to F# samples and walkthroughs.|