InfoQ

InfoQ

News

My Bookmarks

Login or Register to enable bookmarks for unlimited time.

The content has been bookmarked!

There was an error bookmarking this content! Please retry.

F#: Two Remarkable Years

Posted by Jonathan Allen on Jan 10, 2007

Sections
Development,
Architecture & Design
Topics
.NET ,
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
Re: F#: Two Remarkable Years by Don Syme Posted
Re: F#: Two Remarkable Years by Eirik Mangseth Posted
Two Remarkable Problems... by Stefan Wenig Posted
Re: Two Remarkable Problems... by Alex Peake Posted
Re: Two Remarkable Problems... by Stefan Wenig Posted
  1. Back to top

    F#: Two Remarkable Years

    by Eirik Mangseth

    >>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.

  2. Back to top

    Re: F#: Two Remarkable Years

    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...

    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

    by Eirik Mangseth

    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"

  5. Back to top

    Re: Two Remarkable Problems...

    by Alex Peake

  6. Back to top

    Re: Two Remarkable Problems...

    by Stefan Wenig

    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.

Educational Content

Jesper Boeg on Priming Kanban

In this interview, Jesper Boeg, author of the new InfoQ book – Priming Kanban, discusses the keys to using Kanban effectively, and how to get started if you are currently using other approaches.

New-age Transactional Systems - Not Your Grandpa's OLTP

John Hugg discusses high volume transaction processing applications with high and low frequency profiles, and how VoltDB can be used for that purpose.

Cool Code

Kevlin Henney examines code samples to see what can be learned from them starting from the premise that one won’t write great code unless he knows how to read it.

Collaboration: At the Extremities of Extreme

Jason Ayers share the observations he made watching a team of developers collaborating in real time on the same code base, pushing XP, pair programming and continuous integration to their extremes.

Yesod Web Framework

Michael Snoyman presents Yesod, a web framework written in Haskell and containing a web server, templating, ORM, libraries (templating, gravatar, etc.).

Transactions without Transactions

Richard Kreuter and Kyle Banker on how to avoid classical RDBMS transactional systems by using compensation mechanisms, transactional messaging or transactional procedures.

Attila Szegedi on JVM and GC Performance Tuning at Twitter

Attila Szegedi talks about performance tuning Java and Scala programs at Twitter: how to approach GC problems, the importance of asynchronous I/O, when to use MySQL/Cassandra/Redis, and much more.

10 tips on how to prevent business value risk

One category of risk that project teams need to ensure they address is business value failure – delivering a product that fails to provide value for the business investor.