Microsoft's F# language geared to parallel programming, data-oriented problem-solving
The F# (pronounced "f sharp") object-oriented functional programming language originated at Microsoft Research around 2004. It was designed by Don Syme, principal researcher at the company. The language is geared to data-oriented programming as well as parallel programming and algorithmic development. F# 3.0, featuring support for large-scale schematized data and APIs, was released last year along with an update to Visual F# tools in Microsoft's Visual Studio 2012 IDE; Microsoft recently updated its Try F# website, which provides tools and resources for using F#, as well. InfoWorld Editor at Large Paul Krill recently spoke to Syme for perspectives on what Microsoft is trying to achieve with the language.
[ALSO: 15 free Microsoft tools]
InfoWorld: What can developers do with F# that they can't already do with C#, C++, Visual Basic, or other programming languages available?
Syme: One primary difference is that F# is a functional-first language and in many ways a data-first programming language. The construction of the language is carefully designed to facilitate data-oriented problem-solving and manipulation in a functional programming way. One of the key aspects of functional programming is to reduce the bug rate for doing routine manipulations over data structures.
InfoWorld: What exactly is a functional language?
Syme: One of the primary characteristics is that data is represented in a way that is called immutable. What this means is that you have descriptions of data, such as a design, so perhaps you can imagine taking a picture, and the programming is more oriented around transforming what you have and producing a new picture as a result. Instagram, for example, or Excel is also a functional kind of system, where you take data and you specify how that data changes through the system. A functional programming language is one that takes that paradigm through [to] general purpose programming.
InfoWorld: What was the main impetus behind F#?
Syme: It reduces the time to deployment for analytical software components. You find that kind of programming, particularly in finance and insurance industries, but also in a wide range of scientific or data-oriented or data-intensive programming domains. Microsoft embraced F# and contributed to F# because we want a top-notch functional programming experience on our platforms. Microsoft contributes three things to F#: One is the Visual F# tools, which come with Visual Studio. Microsoft Research contributes the language design to F#, and we also contribute the Try F# site that has just been released this week.
InfoWorld: Is F# basically for parallel programming?
Syme: Yes. It's one of the things that F# is very good at, and it comes from this functional, stateless approach to programming.
InfoWorld: Are there open source and commercial versions of F#?
Syme: When you use F# on a Mac or Linux system, you normally use the open source version of F#. When you use it on a Windows system, I think it would be normal to use the Microsoft implementation of F# and the Visual F# tools. You can use the open source version on the Windows system, as far as I know. You can, but that is not normally the way that people use it.
InfoWorld: You mentioned support for F# in Visual Studio. Are there any other tools out there besides Visual Studio that you can use to develop with F#?
Syme: The F# Software Foundation provides tooling for MonoDevelop, which is a cross-platform IDE, and they also provide tools for Emacs, and they have a lot of other tooling, slightly less integrated tooling there for other editing environments.
InfoWorld: How much development has already been done with F#, and can you name any big-name programs or websites that have used it?
Syme: There are many users of F#. For instance, there are 4,000 questions on StackOverflow about F#. Those questions indicate quite a lot of users of the language.
In terms of people using it, we often talk about a system that was done by sort of the Microsoft advertising platform, which was a machine learning system that used F# as the implementation language. This was from the core algorithm to decide which ads to serve in response to a search requests for questions coming in from Bing or the like. And these are really critical core algorithms and very much the kind of programming that we associate with F#, where you might have some core algorithmic code or core data analysis code written in the language.
Then around the outside, it would be deployed in some larger system because one of F#'s main benefits is it has very good interoperability with systems like .Net and C#. You can take F# and integrate it into a larger system. That system was very good. There are case studies on the Microsoft site from Grange Insurance, and there are case studies from a major bank in Europe, which has over 100 people writing their quantitative finance models in F#.
InfoWorld: Would you use F# for a Web program?
Syme: You would use F# for server-side Web programming, absolutely. The Visual F# tools aren't particularly aimed at client-side Web programming, but there are other F# tools provided by third-party companies. I point you to IntelliFactory, who do a tool called WebSharper [for HTML5 Web programming].
InfoWorld: How does Microsoft make money from F#?
Syme: It's fairly well understood that Microsoft invests in languages because we have platforms that have programmability requirements. We invest in F# because that helps make our platforms better, and through our platforms we get revenue.
InfoWorld: Is there anything else that's really critical to the F# game plan that you want to talk about?
Syme: One of the things I'm really excited about with Try F# is not just that people can learn F#, but that they see groundbreaking ideas in how data is integrated into the language in F# 3.0. People these days want to use something that's very polished, where they can play with the ideas and see what a difference it makes to their programming. And these things can disseminate very broadly.
For instance, we did asynchronous programming in F# 2.0, and that has now progressed into C# 5.0. That is just wonderful to see that these ideas are progressing out from the cutting edge high-productivity functional languages into the broader programming industry. To me, as a researcher, that is also just a great success.
This article, "Microsoft to big data programmers: Try F#," was originally published at InfoWorld.com. Follow the latest developments in business technology news and get a digest of the key stories each day in the InfoWorld Daily newsletter. For the latest developments in business technology news, follow InfoWorld.com on Twitter.
Read more about application development in InfoWorld's Application Development Channel.
This story, "Microsoft to big data programmers: Try F#" was originally published by InfoWorld.