F# – A Functional Programming Language

One of the important themes in programming languages over recent years has been a move to embrace ideas from functional programming

Language features such as lambda expressions in C# and generics in .NET 2.0 have roots in functional languages, and LINQ is directly based on functional programming techniques.  Through LINQ and Parallel FX, ideas from functional languages are helping us address some of the biggest challenges facing the industry today, from the impedance mismatch between data and objects to the challenges of the multi-core and parallel computing space.

Several of these key technologies have started out as projects in Microsoft Research.  One of the really promising current projects from MSR is the F# programming language, spearheaded by Don Syme. F# stems from the functional programming tradition (hence the ‘F’) and has strong roots in the ML family of languages, though also draws from C#, LINQ and Haskell.  F# is designed from the outset to be a first class citizen on .NET.  This means that F# runs on the CLR, embraces object-oriented programming, and has features to ensure a smooth integration with the .NET Framework.

I am a big fan of technology transfer between a research organization and a product development organization so that we can “productize” the great research ideas and deliver to customers in a timely manner.  This is one of the best things that has happened at Microsoft ever since we created Microsoft Research over 15 years ago.  Here is another great example of technology transfer at work.  We will be partnering with Don Syme and others in Microsoft Research to fully integrate the F# language into Visual Studio and continue innovating and evolving F#.  In my mind, F# is another first-class programming language on the CLR.   

Our interest in F# is motivated by several factors.  As I mentioned above, we aim to continue the flow of good ideas from functional programming world into mainstream development.  Furthermore, the somewhat mathematical slant of functional programming just seems naturally appealing to professionals whose primary domain is described with mathematical notation - domains such as financial, scientific and technical computing.  On top of the syntactic appeal, the strong type system yields the sort of guarantees which are often crucial in these domains, and enables a superb tooling experience through Visual Studio.

Another motivation is to continue to invest in making the .NET Framework a great choice in academia.  Many computer science departments around the world teach functional programming languages today.  We believe that through F# and languages such as IronPython and IronRuby we can help offer students and educators choices beyond the current mainstream and enable the use of these languages across the curriculum.  This helps educators have the option to use Visual Studio as a consistent tool set from course to course.

You can find out more about F# in Don Syme’s blog, and at http://research.microsoft.com/fsharp.


Comments (102)

  1. Stefan Wenig says:

    The F# license still requires me to statically link the F# libraries for any commercial purpose:


    Which means, that any F# type, like Tuple<A,B>, will in fact be two different types when you link two F#-compiled assemblies. Not a very workable procedure. If you’re serious about making F# a first class .net language, I’d start with a fix to that license.

    Otherwise, this is fascinating stuff!

  2. Actually, I have tried to play with F# a year (or two?) ago but that wasn’t ready to be played with 🙂

    Ability to combine .NET imperative languages based projects (for UI and part of the business logic) with functional language based ones lokks bery promising. That would be really great.

    Does F# allow such combination? Can I for example incapsulate all my scientific calculations logic into F# project and then use its output dll in my C# UI project?

  3. Stefan Wenig says:

    Dmitry: yes. The way ML constructs are mapped to CLR types is pretty clean, with good use of generics.

  4. Thanks for the answer. Will try F# again to create working application in combination with C#.

  5. Anjanesh says:

    This looks like Microsoft’s solution to Python.

  6. Somasegar, the head of the Developer Division at Microsoft, has announced the productization of F#. Read…

  7. Somasegar Announces Productization of F#

  8. Very cool. I&#39;d say the idea of using F# for real projects is getting closer to a pragmatic reality

  9. Finally. I hope that MS embrace the communities of other popular functional languages like Haskell to

  10. Steve Thompson says:

    Having bought and worked through half of the F# book, my opinion is that this language will never gain mainstream acceptance.  Unlike other functional languages such as Nemerle, the author thought it important to stick closely to the OCaml method of expression.  The reason that I walked away from the book and the language is that I found the syntax a huge obstacle to understanding the fundamental concepts.  Realize that I am always experimenting with new languages – it is like a hobby of mine (I am currently looking into Erlang).  For someone like me to disparage F# means that the likelihood of the average .Net programmer picking up this language is vanishingly remote.

  11. My brother Peter Plamondon and I started Project 7 at Microsoft, which was the code-name for an effort to (a) get the .NET & Visual Studio.NET  products opened up to non-Microsoft languages and (b) get non-Microsoft languages implemented on .NET.

    You might think that this was "obviously" the right thing to do — we certainly did! — but at the time (1998-99), we had to fight all the way up to the #3 guy at Microsoft, Paul Maritz, to get approval and funding for the project (thanks, Paul!).

    There was a LOT of resistance. Microsoft had just been burned by a non-Microsoft language — Java — and there were those who felt that Microsoft should be actively suppressing the emergence of new languages, not facilitating it.  Fortunately, Paul recignized that the emergence of Java proved that Microsoft could not suppress the emergence of new languages…and that it shouldn’t WANT to do so.  Better to encourage their emergence, and to make it super-easy for them to emerge first, best, and only on Windows. This is what’s happening now with languages such as F#.

    In Project 7, Peter handled the commercial languages; I handled the academic languages.

    One of the main reasons I wanted to open up .NET and VS.NET this way was to facilitate the miscegenation of programming languages — the mixing together of ideas and features that can only happen on top of a platform (the CLR) that provides a simple, open, flexible DNA for programming languages).  "Miscegenation" is a term previously applied by racists to the "horror" of inter-racial mixing.  I use it advisedly in the context of programming languages, which are often approached with equally-strong biases favoring language purity, which I believe to be equally wrong.

    The next step after mixing & matching features, I think, is a wholesale re-engineering of programming languages.  If one can mix and match ideas and features freely within languages, then why not modularize these features? The history of programming languages has been the history of a succession of single, dominant, monolithic programming languages that each were the de facto standards of their day.  A new language would bursting onto the scene with initial promise of advancing the state of the art, then become a drag on progress as the state of the art advanced beyond the current domiant language’s central paradigm.  A great example is C++, which became so dominant that the great ideas in other langauges — such as Eiffel’s use of contracts — languished.  A more modular approach to programming languages would facilitate the miscegenation of language features, allowing things like contracts to find their way into the mainstream much more efficiently.

    Then, programmers would chose the best language to write each piece of a coding task, just as a carpenter uses a hammer for one task and a saw for another.

    This modular approach to language functionality would (a) allow the more-rapid evolution of programming language functionality, and (b) be available first, best, and perhaps only on Windows, because no other platform has the necessary infrastructure (and presumably Microsoft has patented the holy shit out of the CLR and VS.NET).

    If, at the same time, Microsoft were to aggressively support the use of VS.NET as a cross-platform development tool, implementing redistributable .NET equivalents ("the .NET Platform") on other operating systems, then this would de-commoditize programming, establishing Windows as the most efficient platform for developing applications for the .NET Platform (and thereby all other OS’), thereby ensuring that the best applications were developed first, best, and perhaps only for Windows. This could make it possible for Microsoft to regain the Cool Factor Cup than Linux et al. have recently captured.

    Of course, this de-commoditization only happens if VS.NET, the CLR, and the novel re-engineering of programming languages allows such a big jump in programmer efficiency that programers who don’t use it are outcompeted in the marketplace.  That’s what de-commoditization MEANS.

    My two cents of free advice.  🙂

    James Plamondon

    Microsoft, 1992-2000

    now CEO, Thumtronics Inc

    The New Shape of Music(tm)


    Austin, TX

  12. Soma announced some exciting news this morning. Developer Division–the people at Microsoft who make

  13. Soma – Does this mean we will see F# ship with Visual Studio 2008 or Visual Studio 2008+1?

    Thanks – Jordan

  14. OCaml China says:

    微软Developer Division部负责人 Somasegar 在自己的 blog 上发布了一条关于 F# 产品化的 消息,而Jomo Fisher的另一篇 blog 则披露了更多的 内容。

  15. Today is an exciting day for the F# team. The Corporate VP for the Microsoft Developer Division, S. Somasegar

  16. Soma made an interesting announcement today : F# will become an official Microsoft .NET language (like

  17. Richard Hein says:

    @  Anjanesh; you said:

    "This looks like Microsoft’s solution to Python."

    F# is nothing like Python, it’s drastically different – did you jump on that just because it has tuples?  <i>IronPython</i> is Microsoft’s solution to Python….

  18. Sergei Lopatin says:

    You absolutely can’t judge F# by just reading the book. Try to program a decently-sized practical application with it, like I did – you’ll get hooked pretty quickly.

    Congratulations to Don and the rest of the F# team! F# is a productivity gem. I can’t wait to see just as good support for F# in Visual Studio as C# currently has.

  19. LukeH says:

    Jordan –

    No, F# won’t be included in the box with Visual Studio 2008.

    We have not finalized how or when we will ship the productized version of F#.   We will, however, want to get community feedback during the development phase with CTPs and Beta releases that developers can try out along the way. You can watch Don Syme’s blog for updates as we have them.

    Note that in the meantime, the Microsoft Research download of F# is available from http://research.microsoft.com/fsharp, and provides everything you need to learn more about F#.


    Luke Hoban

  20. JHugard says:

    Woot Woot!

    The more I learn F#, the more I find it an incredibly fun language with powerful, enabling, and useful features.  It’s getting hard to go back to C# and C++ for real work.

    I hope this announcement provides sufficient resources to the project to help smooth out the rough edges (syntax quirks, error messages, Intellisense nits, etc.) while at the same time not stifling the advancement of innovative features like Active Patterns (love RegExp matching), Async Workflows, and Expression Quotations (please consider including Tom’s excellent Web Tools!) and the rest.

    Very exciting news!

  21. You’ve been kicked (a good thing) – Trackback from DotNetKicks.com

  22. This is great news indeed. Now, if you only created a Haskell compiler for .NET then I would be really ecstatic.

  23. Creo que he aburrido a m&aacute;s de uno con mis entradas hablando sobre programaci&oacute;n funcional

  24. I think I’ve bored to death more than one acquaintance talking about functional programming , F# , and

  25. Creo que he aburrido a más de uno con mis entradas hablando sobre programación funcional , F# y Haskell

  26. David Thompson says:

    This is really wonderful news. Congrats to Don and all the others.

    This is really big news for me since it means I’ll be able to use (sometimes) functional programming in my contracts gigs – using another ms supported language is a much, much easier pitch than using a language from academia (it may be the case that this is silly, but it’s still true).

    I need to find my copy of "ML for the working programmer" and see what F# books are out there.

  27. art_scott@msn.com says:

    F# meets RIA, WPF, XNA, Expression, multi-core,Silverlight, Popfly…? Can’t wait.

  28. Darth Bundy says:

    Some interesting news emerging from the Visual Studio and F# team appears that language appears to moving

  29. Darth Bundy says:

    Excellent news – actually got the book two days ago. Any ideas on what project templates you’ll be create (ASP.NET, Web services, etc…)?

  30. I just saw the announcement on Don and Soma’s blogs about the fact that a product team has officially

  31. Back in February I blogged about some of my thoughts on the experimental languages Microsoft Research

  32. F# bude ve Visual Studiu Možná jste v posledních pár dnech zaznamenali, že se na internetu hodně píše

  33. F# bude ve Visual Studiu Možná jste v posledních pár dnech zaznamenali, že se na internetu hodně píše

  34. Back in February I blogged about some of my thoughts on the experimental languages Microsoft Research

  35. Time for another weekly roundup of news that focuses on .NET, agile and general development content:

  36. O Soma, o VP chefe das ferramentas de desenvolvimento anunciou suporte à linguagem “F#”, desenvolvida…

  37. secretGeek says:

    Go Don Syme!! Go F#!!

    I worry as others do that F# will shoot over the heads of too many of us programmers… with PLing coming to C# mainstream we’ll probably avoid needing to think about it…

    And i fear Steve Thompson has a point, above with:

    "ikelihood of the average .Net programmer picking up this language is vanishingly remote"

    but i disagree on principle with his statement that:

    "syntax a huge obstacle to understanding the fundamental"

    as i’ve seen too many dyed in the wool programmers argue that VB.net or C# is fundamentally superior to C#/Vb.net on such shallow basis.

    I reckon that syntax is very tangential for anyone who *uses* a language in anger. The human brain is very maleable.

    Am I the only one amused that F# (with it’s Oh’Cameel’ roots) has attrrrracted comeents from freench pee-opeel.

    In regards to this statement:

    "This looks like Microsoft’s solution to Python."

    I’m just glad that Richard Hein already responded  to that comment.

    lb (secretGeek.net)

  38. Steve P says:

    I don’t see this becoming a serious academic language unless a free version of VS.NET can run it. I don’t see academics forking out money for it, no matter how good it is. Not sure, maybe you can run it on the Personal Edition or whatever it’s called, but I’m guessing you will be limited in many features?

  39. tomasp says:

    I agree with the last comment by Steve P – having a free (somehow limited) version of F# in Visual Studio is a must have. Many people who consider using F# (currently) don’t have access to VS, so something like "Visual Studio Express for F#" would be fantastic!



  40. Post-Vision says:

    de-commoditization has been happening since MS pushed VB and caused a mass headache to C++ and encouraged script+typeless chaos.

    And even the work of 1998 when you all stood up to Bill with his infamous response ‘heard of Windows?’, it still has pretty awful results.

    People doing VB.NET asking for C# version while IL constructs are already available and a full-fidelity conversion back and forth is a matter of downloading a popular tool speaks volumes doesn’t it?

    Good luck to Cambridge people anyway.. they deserve all the support (and don’t even plan to release it without Dr.Harrops libraries included in source, otherwise you know Sony and PS3 people will do the business before you know it 🙂

  41. This announcement is great news because, in addition to Generics & LINQ, gives further credibility to the FP community.  Kudos to Don Syme and his team for being so persistent & innovative all these years!

    For me the major issue in productizing F# is picking the area of specialization in which we can really make a difference considering the fact also that C# 3.0 & VB9 are just around the corner. Is it scientific computing & visualization as some early uses imply? Is it in metadata processing & theorem proving, an area in which SML itself started its life (the modern incarnation of which nowadays would be rdf/owl processing)? Is it as a novel approach to UI development such as reactive programming?

    Is it as a low overhead platform for Domain Specific embedded Languages development? Is it as a testbed for developing parallel algorithms for both synchronous (i.e. PLinq) and asynchronous scenarios? Or is it  as a general purpose business rules & workflow development platform?

    The answers that the community/F# team gives to questions such as the above would clearly provide steering wrt the language constructs that need to be frozen in the final product. Tooling will also need a fresh approach, i.e. mapping algebraic types to relational dbs is not covered by ORM techniques.

    I am intrigued with the possibilities…


  42. Cygnus says:

    Yippee.  <yawn>

    Another gadget language.  You can dedicate resources to F# to make it a "first class citizen on .Net", but C++/CLI gets secondary attention.  Sounds like my suspicions of anti C++ bias were well-founded.

    Oh, and please stop with the poor analogies.  A programming language is not analogous to a hammer.  It’s more like a tool chest or workshop.  Now, how many carpenters want to use different workshops – with different tools stored in different places – every time they start a new job?  And, add to that, how many want to be working on a job and have to switch back-and-forth between jobs workshops while trying to finish each job in a timely manner?

    Why don’t you spend time on the gadgets after you’ve finished with the important stuff?

  43. F# is an official .NET language now , posted on Channel8 Soma had the news today. F# is an official .NET

  44. You’re savvy in the ways of C#. You know the .NET Framework like the back of your hand. Or do you? Just

  45. Somasegar in questo post della scorsa settimana pubblicizza F# e lo pensa come un lingaggio di prima

  46. The Trainer says:

    Microsoft plans to integrate F#, a functional programming language developed by the Microsoft Research

  47. Ευχάριστα νέα για το μέλλον της F#, μας έρχονται από το στρατόπεδο της MS! http://blogs.msdn.com/somasegar/archive/2007/10/17/f-a-functional-programming-language.aspx

  48. With the latest news about baking F# into Visual Studio I figured re-solving the problems from Project Euler would be a great way to learn F# and hopefully come up with cleaner solutions. This post will go over my solution for problem 1 in F#.

  49. Leggo solo ora sul blog di Soma un post del 17 ottobre dove viene spiegato che c&#39;&amp;#xE8; l&#39;intenzione

  50. Brad Williams says:

    I agree that F# should not be judged by the first book about it, "Foundations of F#", which was very hard to read — I was probably too generous to give it 3 stars on Amazon.  Fortunately, this announcement means better books will come.  And:  Don Syme’s book, which looks to be quite good, is expected next month.

  51. Microsoft has announced that support for the F# functional programming language will be fully integrated

  52. Like lots of other netizens, far too much information passes across my virtual desk in a day. With blogs,…

  53. Me he atrevido por fin a instalar el lenguaje de programación F#, similar a Caml e inspirado en OCaml

  54. Intro: F# (BTW : F is for functional) is &quot;Combining the efficiency, scripting, strong typing and

  55. I’ve been traveling for the last week or so, first to Microsoft Research in Cambridge, England and then

  56. Sam Gentile says:

    Getting ready to spend a full 7 days in Redmond starting Saturday and meanwhile trying to bring on two

  57. Olá pessoal, tudo certo? Apenas para sair um pouco do tema SOA, WEB 2.0 e SAAS, um post no estilo Otávio

  58. Soma blogged earlier announcing our intent to productize F#, and we are seeing some press coverage of

  59. I’ve been playing around with F# for a little while, but I hadn’t gotten my hopes up that it’d end up

  60. Hace dos años, tuve el gusto de dar una charla con Martín Salías , en Microsoft de Argentina, sobre lenguajes

  61. F#, le petit nouveau des langages .NET Microsoft Blog de Soma ( annonce de F# ) Nouveau pas vraiment,

  62. The week of OOPSLA is now over and life has now returned to its regular path. Some notes from last week’s…

  63. Marco Russo says:

    Poche settimane fa ho citato un post su una caratteristica di F# che è interessante anche se non si è

  64. Eldo Issac says:

    Its nice to see another addition to the library… Just got it downloaded and about to explore the feature…

    I’m sure there is a lot of fun hiding in there…

  65. Bruno Martins says:

    I love ocaml and when I saw F#, I loved the idea. What about speed? Ocaml is very fast language. What about F#?

  66. I’ve just arrived in Barcelona, for TechEd Developers. What an event! First, on the product side, there

  67. F# (pronounced "F sharp") is a functional programming language developed at Microsoft Research that targets

  68. F# (pronounced &quot;F sharp&quot;) is a functional programming language developed at Microsoft Research

  69. I&#39;ve just arrived in Barcelona, for TechEd Developers. What an event! First, on the product side

  70. A few weeks back, Soma blogged about an increased investment by the Microsoft Developer Division in the

  71. Recently, I started to re-wire some mildly used parts of my brains to accommodate capabilities for a

  72. Recently, I started to re-wire some mildly used parts of my brains to accommodate capabilities for a

  73. The shift to multi- and many-core processors that is currently underway presents an exciting opportunity

  74. The shift to multi- and many-core processors that is currently underway presents an exciting opportunity

  75. Just tried F# on Visual Studio Team System last night. It ran smoothly… so far. The first thing I tried

  76. Collected from Mahesh Kumar http://cyberiafreak.spaces.live.com/ I. 20 Ways to Come Up With Amazing Ideas

  77. Quisiera comentar hoy algunos recursos en la web sobre el lenguaje F#, implementación de programación

  78. 阿伦.NET says:



  79. F# es un lenguaje nacido en Microsoft Research, de la mano de Don Syme. Pero no es un lenguaje funcional

  80. Aaron Marten says:

    Ever since Mattox Beckman introduced to the OCaml language to us lucky enough to be in his "Languages

  81. Ever since Mattox Beckman introduced the OCaml language to those of us lucky enough to be in his &quot;Languages

  82. F# é linguagem funcional, orientada a objetos, anunciada pela Microsoft no final de 2007 e agora integrada

  83. I look forward to learning F# because I last studied structured programming in languages like BASIC, COBOL and C.  Even though I am now attempting to learn and understand the object-oriented "way of things" now with languages like C#, I still have most of my schooling in modular and top-down programming. So, this could be a great opportunity down the road.

  84. F# は、 Microsoft Research が開発した、 OCaml ( Objective Caml )と互換性のある .NET の関数型プログラミング言語です。 C# など他の .NET 言語も相互に呼び出せ、

  85. Se va uno una semanita de vacaciones y montones de cosas pasan. Por ejemplo, Don Syme y compañía han

  86. You leave on vacation for one short week and a lot happens… for example, Don Syme &amp; co. have released

  87. Publicación del inglés original : Martes, 2 de septiembre de 2008 2:07 PM PST por Somasegar El pasado

  88. [原文地址]: F# September 2008 CTP Released [原文发表时间]:Tuesday, September 02, 2008 2:07 PM 去年 10 月, 我在 blog

  89. Microsoft F# September 2008 CTP

  90. Steven Burns says:

    Sealevel: if you post everything twice or three times back at home, no wonder you have bored many acquaintances with your stuff 🙂 LOL

  91. Now that F# is being officially productized , I thought it was time I also made it a first class citizen

  92. My F# Notes says:

    (This article is based on two articles that I posted about the book to my other blog). If you’ve been…

  93. Lotus_GIS says:



  94. Dear friends, thank you for visiting our website ,we are an international trade company,which specializes in NFL jerseys. <a href= http://www.cheapnfljerseys4u.com/>Cheap NFL Jerseys China</a>,

    such as Arizona Cardinal,Atlanda Falcons ,Baltimore Ravens,etc.You can buy cheap jerseys. Welcome to visist here .

    Website:  http://www.cheapnfljerseys4u.com

  95. Pralay says:

    The end of the Article looks a marketing stunt to sell visual studio. If Microsoft is really interested in f# to be language of research ( as well as commercial ) than f# has to be open specification and have open source license.

  96. cheap nfl jerseys says:

    Hey guys,

    I hope this allowed, I have never used this website before so I wasn't really sure what this was going to do.  <a href="http://www.nfljerseyse.com&quot; title="wholesale nfl jerseys">wholesale nfl jerseys</a>   So this is just a test post. I really like this forum, it has some excellent discussions that take place.

  97. cheap nfl jerseys says:

    Thanks.<a href="http://www.nfljerseyse.com/pittsburgh-steelers-jerseys " title="Pittsburgh Steelers jerseys ">Pittsburgh Steelers jerseys </a>

Skip to main content