Click to Rate and Give Feedback
MSDN
MSDN Library
Visual Studio
Visual F#
Collapse All/Expand All Collapse All
Visual Studio 2010 - Visual F#
Visual F#

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

F# is a programming language that provides support for functional programming as well as traditional object-oriented and imperative (procedural) programming. The Visual F# product provides support for developing F# applications or extending other .NET applications with F# code. F# is a first class member of the .NET family of languages and retains a strong resemblance to the ML family of functional languages.

F# supports functional programming constructs such as

  • Functions as values, allowing for flexible manipulation of functions. For more information, see Functions as First-Class Values.

  • Function composition and pipelining, allowing the chaining of functions together to create new functions and to simplify the coding of successive operations on data.

  • Type inference, which reduces the need 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.

  • Pattern matching support, which simplifies complex conditional code, and types optimized to be used with pattern matching, such as discriminated unions.

  • Collection types for working with immutable data, including list and sequence types.

  • Lambda expressions, which are key to many functional programming constructs.

  • Partial application of function arguments, which allows new functions to be created implicitly from existing ones.

F# supports object-oriented programming and .NET concepts such as

  • The .NET object model including objects with 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 allows you to extend an existing type easily without the additional overhead of creating a new derived type.

  • Object expressions, which allow small objects to be defined implicitly in expressions, as needed, rather than explicitly declared.

  • Access to the .NET Framework and any managed code assembly.

  • Access to native code through P/Invoke.

F# also supports all the common imperative programming constructs, such as conditional statements and looping constructs.

F# provides an interactive window, which allows you to enter F# code and have it immediately compiled and executed. This allows 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. For more information, see F# Interactive Reference.

F# is integrated with Visual Studio, and has support for

  • Projects, including templates for common project types

  • IntelliSense

  • Debugging

  • Deployment

The F# language has its roots in the OCaml language, and shares a common core language with OCaml.

Topic

Description

Getting Started with F#

Includes information on getting started with this release of Visual F#.

Writing F# Programs with Visual Studio

Information on F# in the Integrated Development Environment (IDE), including project settings and IntelliSense.

F# Language Reference

Reference information on the F# language, including keywords, symbols, operators, and so on.

Visual F# Core Library Reference

Reference information on the F# core library, FSharp.Core.dll.

F# Compiler (fsc.exe) Reference

Information on the F# compiler, fsc.exe, including compiler options and diagnostic messages (errors and warnings).

F# Interactive (fsi.exe) Reference

Information on the F# interpreter, fsi.exe, including command-line options and diagnostic messages specific to the interpreter.

Samples and Walkthroughs (F#)

Provides links to F# samples and walkthroughs.

Other Resources

© 2009 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks | Privacy Statement | Site Feedback
Page view tracker