Your opinion matters! Please fill in the InfoQ Survey!

F# Moves Forward in 3.1 Preview Release

| by Jeff Martin Follow 6 Followers on Jul 03, 2013. Estimated reading time: 2 minutes |

A note to our readers: As per your request we have developed a set of features that allow you to reduce the noise, while not losing sight of anything that is important. Get email and web notifications by choosing the topics you are interested in.

Microsoft’s functional programming language, F#, has just released version 3.1 through the Visual Studio 2013 Preview.  F# originated at Microsoft Research, Cambridge but despite these origins the language is fully support by Microsoft, and is licensed under the Apache 2.0 open source license.

In an announcement by the F# team, the authors describe that in contrast to the major feature implementations of past releases, this release focuses on refinements.  Yet among these refinements F# developers will benefit from several new features including:  improved F# type inference, printf performance, portable library support, and project round-tripping.

The major language additions in 3.1:

  • Named union type fields – Now possible to name union fields within each case of a union type
  • Extensions to array slicing – Previously array slicing was limited to arrays of equal dimensions, but this is no longer required
  • Type Inference enhancements for LINQ-style methods - Improves F# type inference when using overloaded methods which take functions as arguments
  • Support for C# extension members with first parameter a type parameter – 3.1 supports the use of extension members (“this”), as shown in this snippet:  static member M<T>(this T input, T other)
  • Alignment of supported declaration of constants in attributes and literal expressions – Examples include allowing the use of “+” to combine strings or bitwise OR (|||) on enum flags

Compiler Library / Additions

  • Printf performance – No code changes required to take advantage of significant speed increases (reportedly 40x faster)
  • Debug info in Quotations – Using the --quotations-debug flag with fsc.exe or fsi.exe
  • Support for .NET 4.5 + Windows Store portable libraries – This means that F# can use C# portable assemblies for built for “.NET 4.5 + Windows Store” and that F# can in turn generate assemblies for that profile.

A big addition for F# developers using Visual Studio in a multi-generational team is the addition of support for project round-tripping.  Any F# project targeting F# 3.0 can be edited in either VS2012 or VS2013.  Coincident with this addition is the ability to specify in the F# project dialog or the Solution Explorer which version of F# to target for the application under development. 

Users can access F# 3.1 through the VS2013 Preview today.  Note that the 3.1 enhancements described above are not yet available in the open source edition which does support several non-Windows platforms (OS X, Linux, etc).  The F# developers state that the 3.1 features will be released into the OSS project once complete.

Rate this Article

Adoption Stage

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread
Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread


Login to InfoQ to interact with what matters most to you.

Recover your password...


Follow your favorite topics and editors

Quick overview of most important highlights in the industry and on the site.


More signal, less noise

Build your own feed by choosing topics you want to read about and editors you want to hear from.


Stay up-to-date

Set up your notifications and don't miss out on content that matters to you