Foundation Spreads The Word On F#

Darryl K. Taft covers IBM, big data and a number of other topics for TechWeekEurope and eWeek

The fledgling F# Foundation wants to increase the popularity of Microsoft’s F# programming language, originally developed in Cambridge

A group of software developers dedicated to the F# functional programming language has banded together to form the F# Foundation to advance the language in the enterprise and beyond.

According to the foundation’s web page, the F# Software Foundation (FSSF) exists to promote, protect, and advance F#, and to support and foster the growth of a diverse international community of F# users.

Cambridge-based development

The group formed in November and is just beginning to get off the ground. The FSSF maintains a core open-source F# code repository and distributions made available to the public free of charge for use across multiple platforms, the foundation said. This includes the F# compiler, F# language specification, the F# core library and assorted tools and applications.

The F# language came out of Microsoft Research Cambridge, designed by Microsoft researcher Don Syme. Microsoft began talking publicly about the project as early as 2003.

A FAQ on the Microsoft Research site at the time said: “F# is an implementation of the core of the CAML programming language for the .NET Framework, along with cross-language extensions. The aim is to have it work together seamlessly with C#, Visual Basic, SML.NET and other .NET programming languages.”

F# is meant to bridge the best of the functional, imperative, object-oriented and typed-classed languages, Microsoft said at the time. And they stuck to that goal, eventually releasing F# as one of Microsoft’s core languages and open-sourcing it.

F# is a strongly-typed, functional-first programming language for writing simple code to solve complex problem, the FSSF says. Functional programming is a programming paradigm that treats computation as the evaluation of mathematical functions and avoids state and mutable data.

Reducing deployment time

“From the business perspective, the primary role of F# is to reduce the time-to-deployment for analytical software components in the modern enterprise,” a description on the foundation’s site said. “Its interoperability with all .NET languages and libraries and its ability to tackle the complexity of components such as calculation engines and data-rich analytical services offer a compelling story for businesses.”

Also, according to the FSSF: “Modern programming thrives on rich spaces of data, information, and services. The latest version of F# (3.0) greatly simplifies information-rich analytical programming through the addition of F# Information Rich Programming, consisting of F# LINQ Queries, the F# Type Provider mechanism, and a set of built-in type providers for enterprise and web data standards. F# is a first-class language on a number of platforms including Mac and Linux (with tool support in MonoDevelop, Emacs and other) and Windows (with Visual Studio) as well as on mobile devices and on the web using HTML5.”

Gene Belitski, a software developer with a passion for functional programming and FSSF member, said the main goal of the F# Foundation is to “promote F# beyond the .NET/Microsoft realm, which is, in my opinion, a bit too narrow for such a wonderful tool as F#”.

Jon Harrop, an FSSF member and co-founder of Flying Frog Consultancy Ltd., a technology firm specialising in the use of technical computing in science, engineering and finance using F#, OCaml, Mathematica and C#, said he too wants to see F# succeed beyond the Microsoft tools stack.

“As open source software, F# has great potential for education so we want to see it taught in schools and universities around the world and made available on computers like the Raspberry Pi,” Harrop said. “F# is perfectly suitable for software development on Android and iOS but, to date, nobody is really using it for this. The F# Foundation was created to help with all these non-Microsoft initiatives. For example, Xamarin sells fantastic products that provide .NET-like software development tools for Android and iOS development including C#, but not yet F#. So we are pushing them to add F# support to their products.”

Harrop said many of Flying Frog’s clients want to develop mobile applications in F#, so the firm wants to work with the F# Foundation to make this easier.


Meanwhile, Cesar Mendoza, an FSSF member and software architect at DuPont Pioneer, said as a .NET developer interested in functional programming, moving to F# was a “no brainer” for him. He said he uses F# mostly as a scripting language, which is one feature in F# that does not get as much attention as others.

DuPont Pioneer has a mobile sales force of around 4,000 in North America and each one of them is issued a laptop Mendoza’s team has to provide apps for he said.

“We use F# scripts to automate administrative tasks,” Mendoza said. “When a sales rep connects to our network, the synchronisation process downloads any F# scripts that we have released and runs them on the laptop. What we like about F# is that we have the feel of a scripting language with the safety of static typing.”

For its part, Flying Frog has provided F#-related products and services to more than 1,000 customers around the world, Harrop said. And the company has trained dozens of people in various industries to use F# products, ranging from the CTOs of billion-dollar hi-tech multinationals to ordinary LOB software developers with non-technical backgrounds.

As a scientific computing shop, Flying Frog is quite familiar with Fortran, which has long held a key role in the world of scientific computing, Harrop said. Yet, “Fortran is fine for linear algebra but bad for almost everything else, particularly computer algebra,” he said.

However, Harrop said his shop got around some of Fortran’s limitations with the OCaml language. “We learned from that and set out to encourage wider adoption of this fantastic tool,” he said. “In 2007, when Microsoft learned that we were making money from OCaml they decided to productise their own derivative language called F#.”

‘Pure aesthetics’

Also in 2007, Flying Frog decided to diversify and assessed C#, Scala and Haskell as well as F#.

“We decided that only F# had the essence of what makes OCaml so productive,” Harrop said. That year, the firm shipped the first commercial literature about F#, the F#.NET Journal, and the first commercial product written in F# — the F# for Visualisation library, “which turns F# in Visual Studio into a graphical calculator on steroids”, he said.

As a developer that looks for the art in programming, Belitski said he likes the “pure aesthetics” of F# and appreciates its “tooling quality” and support for “exploratory programming” – where developers can more easily try different things and get a final result that is less error-prone and much faster, than through traditional full build cycles.

“I love F#’s succinct style that eliminates a lot of syntactic noise from the source code,” Belitski said. “I cannot live without static type checking. Not to mention other novel facilities like Active Patterns, Async Computations, Units of Measure, and the latest and greatest, Type Providers.”

To demonstrate that the language could be successful in enterprise environments, Belitski said he promoted F# into the production environment at his former employer, Thomson Reuters, for delivering complex highly scalable backend services.

However, “As of now I’m experimenting with algorithmic trading based on powerful combo of F# for implementing trading robots and R for quantitative modeling backing,” he said.

Filling a gap

Meanwhile, another FSSF member, Antonio Cisternino, a professor of computer science at the University of Pisa in Italy, said he has a history with F# and its creator Don Syme, who he worked with during an internship at Microsoft Research in 2001.

“I was surprised how expressive and smooth coding was with the language,” Cisternino said. “It really felt like filling the gap between compiled and dynamic languages: most of the benefits you have from Python or JavaScript but with the power and efficiency of types and compilation. Moreover there was (and is) the F# interactive tool that was an incredible way to manipulate .NET programs and libraries interactively and seamlessly in a way it seemed magical.”

He also said he likes how F# blends the functional programming tradition with the experience of virtual machines such as Microsoft’s Common Language Runtime (CLR).

One of the first F# projects Cisternino did was VSLab, an add-in for Visual Studio 2008. The tool is available open source on CodePlex, Microsoft’s site for hosting open source projects.

“Now we are preparing a library and a framework for doing scientific programming, but we already have used it in many research projects – for instance for controlling a research prototype for tissue microfabrication in the context of biomedical engineering,” he said.

Cisternino said he also is happy to see that F# is open-source so people will know that an investment on a program is not fully dependent on a specific company. “I really enjoy F# programming with Visual Studio, but I also use MonoDevelop and MacOS and Linux and it is just fine.”

Mono plug-in

Members of the foundation contributed to maintain the Mono plug-in for MonoDevelop, an essential tool for being productive without Visual Studio, he said.

And Microsoft is supporting these efforts. In a 5 December blog post, Microsoft’s Syme said:

“At the Visual F# team, we’re glad to be contributors to the broader F# language and community through the Visual F# tools, the free F# Tools for Visual Studio Express 2012 for web, and the open source code drops of the F# compiler and libraries.

“As part of this, we’re pleased to see that the F# open source group on GitHub has now incorporated the F# 3.0 open source code drop into the Mono 3.0.2 release for Mac OSX.”

Cisternino said after five years of using F# he feels that the language has lot to say and has a huge potential, especially in data analytics and domain specific languages, and he’s been using it for teaching since 2008.

“An interesting experience has been to use it for teaching programming to scientists in physics, math and chemistry to find that many of my graduating students now prefer it over more traditional options such as Mathematica or MatLab — as long as they have the required libraries,” he said.

Belitski added, “I believe the objective needs of the modern world towards the further spread of multi-core CPU/GPU, cloud connectivity, and taming big data would be amplifying attention to F#.”

Do you know all about public sector IBM, the founder of the IT industry? Take our quiz!

Originally published on eWeek.