D
Dan Quirk - MSFT
Guest
Welcome to the F# MSDN forum. Here are some helpful resources to get started:
Microsoft F# Developer Center
Quick Links
- Download the F# November 2010 CTP (release info) or get VS2010
- Download the F# August 2010 CTP (release info) or get VS2010
- Learn F#
- The F# Language Specification (PDF)
- MSDN docs for F# (language reference, library reference)
- F# Programming at Wikibooks (there are lots of samples)
- F# Programming Language at Wikipedia
- F# Code Samples at MSDN ("The F# Samples")
- new! In-browser tutorials at Try F# (requires Silverlight)
- F# on StackOverflow
- F# hubfs Forums
- F# Community Blogs (weekly summary)
- F# on Twitter (daily summary)
- F# on github
- F# Projects at CodePlex
- fpound.net community aggregator
- An open invitation to get in touch with the F# team
Videos:
Good Books:
- Foundations of F# (Expert's Voice in .Net) by Robert Pickering (May, 2007)
- Expert F# (Expert's Voice in .Net) by Don Syme (Dec, 2007)
- Beginning F# by Robert Pickering (Dec, 2009)
- Visual F# 2010 For Technical Computing by Dr Jon Harrop (Apr, 2010)
- Real World Functional Programming by Tomas Petricek
- Programming F# by Chris Smith (Oct, 2009)
- Professional F# by Ted Neward, Aaron Erickson, Talbott Crowell, Rick Minerich (June, 2010)
Hello World Samples:
Sample 1, Sample 2, Sample 3, Sample 4, Fibonacci Numbers, Download Stock Quotes
Code Sample:
// C# :
// using System;
open System
// say hello wrold
printfn "Hello, World! What is your name, user?"
// C# :
// var name = Console.ReadLine();
let name = Console.ReadLine()
// C# :
// public delegate void SaySomethingDelegate(string toWho);
// SaySomethingDelegatesayHello =
// who => Console.WriteLine("Hello, {0}!", who);
let sayHello who = printfn "Hello, %s!" who
// hi
sayHello name
// you can using .NET Framework classes and methods:
let sayHelloDotNet who =
Console.WriteLine("Hello from F# via .Net, " + name + "!")
// hello again!
sayHelloDotNet name
// let's count Fibonacci
let rec fib i =
match i with
| 1 | 2 -> 1
| i -> fib(i-1) + fib(i-2)
// result
printfn "%i" (fib 20)
Note that there is also a "getting started" small sample as a 'tutorial' project template inside Visual Studio.
Tools needed:
Visual Studio:
If you want F# integrated into Visual Studio, then you either need a non-express version of VS2008, or the VS2008 shell (integrated mode; this component is also a free download, linked from the F# download page), or the VS2010 integrated shell (free download). Then install the CTP MSI.
Or, of course, get a full version of VS2010, where F# is built-in.
MonoDevelop:
You can find lots of information about using F# within MonoDevelop here. The F# compiler and fsi.exe are now part of the Mono distribution.
Source: http://stackoverflow.com/questions/734525/getting-started-with-f/734536#734536
Continue reading...