What Is F#?
F# (pronounced "F sharp") is a functional-first, strongly typed language that runs on .NET. It was designed by Don Syme at Microsoft Research in Cambridge, first released in 2005, and is now open source and developed by Microsoft together with the F# Software Foundation and the community.
let languages = [ "F#"; "C#"; "OCaml"; "Haskell" ]
languages
|> List.filter (fun name -> name.Length <= 2)
|> List.iter (fun name -> printfn "%s is short" name)
F# is short
C# is short
Its defining traits:
- Functional-first — values are immutable by default, functions are ordinary values, and programs are built by combining small functions. But F# is pragmatic: you can use mutation, loops, and classes when they fit better.
- Concise — no braces or semicolons at line ends; indentation shows structure. F# programs are often much shorter than the equivalent C# or Java.
- Type inference — the compiler works out almost every type for you, so code reads like a scripting language while staying fully type checked.
- Expressive types — records, discriminated unions, and pattern matching let you model a problem so precisely that many bugs can't be written at all.
- Full .NET access — every .NET library (and every NuGet package) works from F#, and F# code can be called from C#.
F# belongs to the ML family of languages, and its closest relative is
OCaml. This course teaches F# 10 on .NET 10;
the examples were run with the .NET 10 SDK's F# Interactive
(dotnet fsi).