{"id":306191,"date":"2010-04-13T21:45:02","date_gmt":"2010-04-14T04:45:02","guid":{"rendered":"https:\/\/www.microsoft.com\/en-us\/research\/?p=306191"},"modified":"2016-10-16T10:44:36","modified_gmt":"2016-10-16T17:44:36","slug":"f-putting-fun-functional","status":"publish","type":"post","link":"https:\/\/www.microsoft.com\/en-us\/research\/blog\/f-putting-fun-functional\/","title":{"rendered":"F#: Putting the \u2018Fun\u2019 into \u2018Functional\u2019"},"content":{"rendered":"

By Rob Knies, Managing Editor, Microsoft Research<\/em><\/p>\n

You would be forgiven if you thought the \u201cF\u201d in F#\u2014which made its debut (opens in new tab)<\/span><\/a> as part of Visual Studio 2010 (opens in new tab)<\/span><\/a> on April 12\u2014stands for \u201cfunctional.\u201d<\/p>\n

After all, F# (opens in new tab)<\/span><\/a>\u2014pronounced \u201cF sharp\u201d\u2014is a functional programming language for the .NET Framework that combines the succinct, expressive, and compositional style of functional programming with the runtime, libraries, interoperability, and object model of .NET.<\/p>\n

\"Don

Don Syme<\/p><\/div>\n

But Don Syme (opens in new tab)<\/span><\/a>, inventor of F# and leader of the team that incubated the language, has a different, truncated, and entirely whimsical definition.<\/p>\n

\u201cIn the F# team,\u201d says Syme, a principal researcher at Microsoft Research Cambridge (opens in new tab)<\/span><\/a>, \u201cWe say, \u2018F is for Fun.\u2019<\/p>\n

\u201cF# enables users to write simple code to solve complex problems. Programming with F# really does make many programming tasks simpler, and our users have consistently reported that they\u2019ve found using the language enjoyable.\u201d<\/p>\n

Indeed, F#, which has been developed in a partnership between Microsoft Research and the Microsoft Developer Division, is already popular with the .NET developer community. The language is widely known in the academic community and among thought leaders, and the list of admirers will only increase as Visual F#, the result of a partnership between Microsoft Research Cambridge and Microsoft\u2019s Developer Division, becomes a first-class language in Visual Studio 2010.<\/p>\n

\u201cF# brings a really practical and productive functional-programming language into the suite of languages that Visual Studio and .NET developers have available to them,\u201d says Luke Hoban, senior program manager for Microsoft\u2019s Visual Studio Managed Languages team. \u201cF# provides new tools for existing Visual Studio developers and extends the reach of Visual Studio to new audiences.<\/p>\n

\u201cFunctional programming offers important new ways to think about problem solving. The F# Interactive lets developers work interactively with data and application-programming interfaces [APIs] in a lightweight, explorative environment. F# also provides a set of core features for making parallel and asynchronous programming easier.\u201d<\/p>\n

The language enables explorative programming, with the flexibility to translate requirements into code easily. That ability makes F# particularly valuable for the technical, algorithmic, parallel, and data-rich fields, with applications ranging from financial-market analysis to machine learning and from scientific usage (opens in new tab)<\/span><\/a> to game development.<\/p>\n

Such versatility delights Andrew Herbert, Microsoft distinguished engineer and managing director of Microsoft Research Cambridge. But he\u2019s not surprised.<\/p>\n

\u201cOver the years,\u201d Herbert says, \u201cDon has been a significant contributor to Visual Studio, being one of the Cambridge team that did the early work putting key features like generic functions in the .NET runtime.<\/p>\n

\u201cI am immensely proud of this achievement.\u201d<\/p>\n

Syme, of course, is in better position than anyone to provide a detailed definition of his language\u2014and the benefits it has to offer.<\/p>\n

\"Microsoft\u201cF# is a simple, succinct, efficient functional programming language for .NET that lets users concentrate on the problems they are solving rather than getting lost in programming details,\u201d he says. \u201cIts succinct syntax and powerful type inference lets users stay closer to the domain they are working in, and the integration into .NET and Visual Studio gives rich access to the expansive .NET platform.<\/p>\n

\u201cF# has strong support for parallelism and concurrency, through its support for immutability and asynchronous programming, and tools such as F# Interactive enable exploring data interactively, analyzing, visualizing, and testing against live data sources. This interactive development then scales directly up to full .NET component development, without having to rewrite code. F# has established itself as an innovative language on the .NET platform, and many developers have been attracted by looking for interesting new language options when working on .NET.\u201d<\/p>\n

Visual Studio 2010 includes the 2.0 version of F#\u2014the first supported, product-quality release. This will enable usage by a broader set of developers, and the language benefits from Visual Studio debugging and compiling capabilities.<\/p>\n

The Visual Studio release includes important new features of F#:<\/p>\n