BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News F#: Two Remarkable Years

F#: Two Remarkable Years

Bookmarks

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.

Rate this Article

Adoption
Style

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.

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

Community comments

  • F#: Two Remarkable Years

    by Eirik Mangseth,

    Your message is awaiting moderation. Thank you for participating in the discussion.

    >>F# can also claim to be the first .NET language to support generics.

    This is pure bollocks. Eiffel <www.eiffel.com> has generics and was ported to .Net long before F# even saw daylight.

  • Re: F#: Two Remarkable Years

    by Don Syme,

    Your message is awaiting moderation. Thank you for participating in the discussion.

    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

  • Two Remarkable Problems...

    by Stefan Wenig,

    Your message is awaiting moderation. Thank you for participating in the discussion.

    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

  • Re: F#: Two Remarkable Years

    by Eirik Mangseth,

    Your message is awaiting moderation. Thank you for participating in the discussion.

    Don -- I'm not disputing the info in the underlying article (found here <research.microsoft.com/fsharp/about.aspx>).

    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"

  • Re: Two Remarkable Problems...

    by Alex Peake,

    Your message is awaiting moderation. Thank you for participating in the discussion.

  • Re: Two Remarkable Problems...

    by Stefan Wenig,

    Your message is awaiting moderation. Thank you for participating in the discussion.

    Alex, while this looks interresting, i don't think it goes far beyond C# 3.0's Expression<T> 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.

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

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

BT