Introducing F#

F# is a multiparadigm programming language built on .NET, meaning that it supports several different styles of programming natively.

I’ll spare you the history of the language and instead just go over the big bullets:

• F# supports functional programming, which is a style of programming that emphasizes what a program should do, not explicitly how the program should work.

F# is included as part of Visual Studio 2010. This includes the F# compiler and project system, and contains all the features like syntax highlighting and IntelliSense that you would expect.

• F# supports object-oriented programming. In F#, you can abstract code into classes and objects, enabling you to simplify your code.

• F# supports imperative programming. In F# you can modify the contents of memory, read and write files, send data over the network, and so on.

• F# is statically typed. Being statically typed means that type information is known at compile time, leading to type-safe code. F# won’t allow you to put a square peg into a round hole.

• F# is a .NET language. It runs on the Common Language Infrastructure (CLI) and so it gets things like garbage collection (memory management) and powerful class libraries for free. F# also supports all .NET concepts natively, such as delegates, enumerations, structures, P/Invoke, and so on.

Getting to Know F#

HelloWorld.fs with the following text:
// HelloWorld.fs

printfn “Hello, World”