InfoQ

News

F#: Two Remarkable Years

Posted by Jonathan Allen on Jan 10, 2007 06:00 AM

Community
.NET
Topics
Research
Tags
Functional Programming ,
F#

F# is primarily a research project being developed by Microsoft Research. It is a functional programming language built on the Common Language Runtime (CLR) and heavily inspired by OCaml. The list of differences between the two languages is actually quite brief.

F# was first announced by Don Syme in 2005. Since then it has been a major inspiration for mainstream .NET languages, providing much of the groundwork for the LINQ project. F# can also claim to be the first .NET language to support generics.

Two years after its release, it has already made significant progress towards becoming more than just another research project. One of its most noteworthy achievements is that it was used by the DOE Joint Genome Institute to create Darren Platt calls "the fastest genome assembly viewer I've ever seen".

On the lighter side, F# can be used to create games for the XBox 360 using the XNA Game Studio. This is feat that mainstream .NET languages like Visual Basic and IronPython cannot claim.

Extensions for Visual Studio have been available for nearly a year now, which is impressive considering that one of the original .NET languages, JScript.NET, still doesn't have VS support and likely never will.

Don Syme is currently offering sample chapters of his book, Expert F#. His book, along with Robert Pickering's Foundations of F# were picked up by Apress for release this year.

F#: Two Remarkable Years by Eirik Mangseth Posted Jan 10, 2007 8:46 AM
Re: F#: Two Remarkable Years by Don Syme Posted Jan 10, 2007 9:25 AM
Re: F#: Two Remarkable Years by Eirik Mangseth Posted Jan 11, 2007 8:55 AM
Two Remarkable Problems... by Stefan Wenig Posted Jan 11, 2007 5:42 AM
Re: Two Remarkable Problems... by Alex Peake Posted Jan 27, 2007 5:34 PM
Re: Two Remarkable Problems... by Stefan Wenig Posted Feb 13, 2007 3:42 AM
  1. Back to top

    F#: Two Remarkable Years

    Jan 10, 2007 8:46 AM by Eirik Mangseth

    >>F# can also claim to be the first .NET language to support generics. This is pure bollocks. Eiffel has generics and was ported to .Net long before F# even saw daylight.

  2. Back to top

    Re: F#: Two Remarkable Years

    Jan 10, 2007 9:25 AM by Don Syme

    Nice article - thanks for the mention. Eirik - the team at Microsoft Research Cambridge invented .NET generics and used an early version of the F# compiler extensively in early testing. We designed and implemented the generics support for the F# and C# compilers and did essentially the complete implementation in the .NET Common Language Runtime, which then became part of the product. Of course the design of generics in Eiffel formed a significant part of the design backdrop. I guess you could say our modified ILASM assembler was the first language to target generics, followed by the ILX assembler and an early (now discarded) attempt at a "Haskell .NET". Then came early versions of the C# compiler and an early version of the F# compiler as we completed various bits of each (the very first 'hacked up' F# compiler was in 2002, though the language itself didn't really take shape until much later). Early versions of all of these were used extensively in the testing of .NET generics. Cheers Don

  3. Back to top

    Two Remarkable Problems...

    Jan 11, 2007 5:42 AM by Stefan Wenig

    F# is a very promising and fascinating project. Looking at the assemblies generated from F# was quite a nice experience. However, last time I checked there were two major problems that kept me from looking further into it: - F# does not support meta-programming, one of the more interesting features of OCAML (via caml4p). .NET is really lacking here, and it would be great to see a language like F# provide _something_ in this area. - The license is practically unusable for commercial purposes. The need to link statically prevents you from creating F# library under any realistic circumstances. Stefan

  4. Back to top

    Re: F#: Two Remarkable Years

    Jan 11, 2007 8:55 AM by Eirik Mangseth

    Don -- I'm not disputing the info in the underlying article (found here ).

    I'm fully aware of the research that's been (and is) going on and it's implementation in e.g. Rotor.

    I was merely pointing out that the statement "F# can also claim to be the first .NET language (my emphasis) to support generics" isn't true. For it to be true, it should have said something like "F# can also claim to be the first .NET language to utilise CLR-generics" or something similar. I would still claim that the first .Net language supporting generics was Eiffel. That you added support for generics was great news. If only the CLR would support MI as well :-) (perhaps you could pick up a few ideas from Eiffel's implementation of MI). As an end note, it is nice to see functional programming being brought into the mainstream and it is interesting to see that it is Microsoft who's doing so. Regards, Eirik "If I can't Eiffel in heaven, I won't go"

  5. Back to top

    Re: Two Remarkable Problems...

    Jan 27, 2007 5:34 PM by Alex Peake

    "F# does not support meta-programming" -- see http://tomasp.net/articles/fsclassmeta.aspx and http://research.microsoft.com/~dsyme/papers/ml03-syme.ps

  6. Back to top

    Re: Two Remarkable Problems...

    Feb 13, 2007 3:42 AM by Stefan Wenig

    Alex, while this looks interresting, i don't think it goes far beyond C# 3.0's Expression construct. I want to be able to code without quotations, and have some metaprogramming rules applied to the code afterwards. I don't think quotations would solve any of my real problems.

Educational Content

Bindings, Platforms, and Innovation

This presentation focuses on the Internet and separating myth from fact, history from the future, and the mundane from the imaginative. Bob Frankston presents a vision of what could and should be.

Orchestrating Long Running Activities with JBoss / JBPM

This article explores the use of JBoss and jBPM to implement design solutions that effectively address the issue of orchestrating long running activities.

Neo4j - The Benefits of Graph Databases

This presentation covers the use of graph databases as an optimal solution for data that is difficult to fit in static tables, rapidly evolving data or data that has a lot of optional attributes.

Realistic about Risk: Software development with Real Options

This session introduces Real Options and shows how it can help in running your project. Real Options is a decision-making process that can be used to manage risk.

Communication Flexibility Using Bindings

This article discusses the use of bindings on services and references (including the instance of non-configured bindings) as the means to implement SCA communications in a Web and SOA environment.

Writing DSLs in Groovy

After a short introduction to DSLs, Scott Davis plays with the keyboard showing how to approach the creation of a DSL by typing working snippets of Groovy code that get executed.

Scaling Agile with C/ALM (Collaborative Application Lifecycle Management)

IBM Rational and InfoQ present, Scaling Agile with C/ALM, an eBook showing organizations how to become “finely tuned software delivery machines” by enabling team integration and scaling.

Concurrent Programming with Microsoft F#

Amanda Laucher presents a real life enterprise application written in F#. She shows actual code snippets, explaining design decisions and suggesting how to use some of the F# constructs.