Phillip Trelford's Array

POKE 36879,255

The Rise of F#

Back in September 2008, Scott Hanselman ran a piece entitled the Rise of F#. The following year, in October 2009, Somesegar announced the release of F# in VS 2010. April 2010 saw F# 2.0 ship with VS2010. 6 months on F# goes open source under the Apache 2.0 license. Last month, F# entered the TIOBE top 20 for the first time, the first functional language to do so.

According to TIOBE the recent rise in popularity comes as no surprise:

Apart from being a nicely designed language, F# is available in the latest version of Microsoft's Visual Studio (2010).

A year before the August 2010 edition of the ThoughtWorks Technology Radar commented on the rise in interest of functional languages F#, Scala and Clojure:

Two characteristics of functional languages in particular are driving this interest, immutability with its implications for parallelism and functions as first class objects. While the introduction of closures to C# brings some of the latter capability, functional languages are almost synonymous with immutability.

Clearly functional programming has much to offer and interest in F# is rising rapidly. But before we get ahead of ourselves it should be noted that in the TIOBE index C# received a rating of 6.042%, while F# received a mere 0.604%. It therefore seems unlikely F# is going to overtake C# anytime soon, or for that matter Scala overtake Java. However,rather than thinking of F# as a competitor to C#, in many scenarios it is probably more appropriate to think of it is complimentary.

Don Syme remarks in the article Putting the ‘Fun’ into ‘Functional’, on F# 2.0:

F# is complementary to .NET stalwarts C# and Visual Basic .NET, which remain integral to the majority of .NET projects. But C# and Visual Basic programmers can use F# components in their existing applications, enabling developers to maintain their current investments and integrate F# on a component-by-component basis.

Sitting on the near horizon is F# 3.0 and the “magic” of Type Providers:

type Netflix = ODataService<"http://odata.netflix.com">

type SQL = SQLConnection<"Server='.\SQLEXPRESS'... ">

type EmeaSite = SharePointSide<"http://myemea/">

 

Jo Palmer describes F# Type Providers:

Type Providers are a unique mechanism for applying the benefits of strong static typing to external, dynamic data sources. For example, Type Providers enable IDE support for “Intellisense”-style completion on dynamic data sources while exploring their APIs. When the code is compiled, programmers can then enjoy static typing against these data sources with a variety of options for code generation.

F# already provides the kind of terseness experienced with dynamic languages while at the same time allowing the type safety and performance of a statically typed language. With F# 3.0 this capability is extended to accessing data and services.

Interested? Try F# interactively in your browser now.

Back to the now, the TIOBE ratings are based on skilled engineers world-wide, courses, third party vendors and results from popular search engines. Lets take a look at where some of those numbers come from.


Skilled Engineers

According to IT Jobs Watch the trend in demand for F# developer in the UK is up:fsharp-permanent-demand-trend

There is also plenty of anecdotal evidence of the use of F# in the Enterprise from case studies and user group membership.

Selection of F# case studies:

Selection of F# user groups:

At time of writing both the London and New York F# user groups had over 300 members!


Courses

 

In the UK, there are a selection of F# workshops now available through Skills Matter:

F# is also starting to be part of university curriculums around the globe:

With a good selection of books available in print:

Beginning F# Programming FSharp Book Professional F# 2.0 Real World Functional Programming F# for Technical Computing Expert F# 2.0

 

And books online:


Third Party Vendors

MSDN has a good article on F# Tools & Resources by Terrence Dorsey, which details some of the F# Open Source projects, including:

  • Fake – a build automation system
  • TickSpec – a BDD framework
  • FsCheck – a randomized testing framework

There are also a number of commercial products targeting F#:


Search

Google returns 3,720,000 results for “F# programming”.

If that’s a bit daunting a good place for the latest articles is the MSDN F# Developer Center.


Finally, something silly

Scott Hanselman ended his Rise of F# article with “something silly”, a 2D Tron-Clone game written in 182 lines of code, which you can now play online if you have Silverlight installed.

A recent post on the F# Snippets site gave us a Mine Sweeper in 99 lines of code.

FineSweeper

Update 23rd September 2011:

F# is the programming language of choice for discriminating hackers!

Pingbacks and trackbacks (2)+

Comments are closed