Introduction
Features
F# Interactive Console
F# Keywords
Supported IDE
-
Visual Studio 2008 - Visual Studio 2010
Web References
Books
Introduction
F# is a functional programming language that is built on .NET Framework. It is concise, expressive and composible, the features of typed programming language.
This means that F# has immediate access to all
the all .NET Framework APIs like WPF
and DirectX.
Similarly, libraries developed in F# may be used from other .NET languages.
Functional language implement mathematical functional instead of maintaining state of objects.Functional language is rely on lambda calculus.
Erlang, Haskell, Lisp, ML, and Scheme are the languages that relied on lambda calculus.
Features
- Embraces object-oriented programming and includes
support for type-inferring, succinct descriptions of object types.
- Support for the features of functional programming
including tuples, lists, options, function values, local function definitions,
pattern matching and sequence expressions.
- The powerful type inference allow code to be both
succinct and yet fully type-checked.
- F# also includes support for advanced functional
programming constructs such as active patterns and computational expressions.
- Includes support for a form of meta-programming,
This allows data queries to be expressed and type-checked in F# code and then
dynamically compiled and translated to target languages such as SQL using the
LinqToSql framework.
- F# supports advanced language and runtime features
such as Unicode strings, dynamic linking, preemptive multithreading, and SMP
support.
- The F# Interactive environment fsi.exe supports top-level development and
exploration of the dynamics of your code and environment.
- Visual Studio integration that supports features
such as an integrated build/debug environment, graphical debugging, interactive
syntax highlighting, parsing and type checking, IntelliSense etc.
- F# can be used with tools from the .NET Framework,
Microsoft's Visual Studio and many other .NET development tools.
F# Interactive Console
F# console Application compile and run in Interactive console.Just select the code and right click on Send to interactive to compile and run code interactively.
Here I have written one sample console application, that compiles and run interactively. Here is F# console application template and demo application screen shot.


F# Keywords
let is the most important keyword and used to declare and assign variables. Similarly we can define functions by using let.
For example
let x=0
declare a variable and assign value 0, so by type inference x will we integer.
Second most important keyword of F# is pipe (|>), that is used to send output from one pipe to another.
let square x=x*x
let sumOfsquares nums=
nums
|>Seq.map square
|>Seq.sum
here sequence of square of numbers passed to next pipeline to sum up the squares.
Supported IDE
F# is available for Visual Studio 2008 and Visual Studio 2010. F# will be included in VS 2010 just like other languages, for VS 2008 F# is available as an addin. F# Down loads are available at Microsoft Research.
Web References
Books
Expert
F# by Don Syme, Adam Granicz, Antonio Cisternino