Gflat

It pains me to say it, but it looks to me as if Microsoft’s F# is full of win.

A couple of years ago when I was still hacking C# for a living, I was also seriously getting into Haskell and hoping ardently for the day when something like Haskell.Net would arrive, complete with really joined-up Visual Studio support, nice intellisense and what-have-you. The holy grail was being able to program in a smart-programmer-friendly language, whilst benefitting from libraries and a development environment designed for mainstream use. The greatest advantage would lie in being able to write some bits of an application in the clever language I admired, and other bits in the not-so-clever language that I was certain I really understood, with both targetting the same runtime.

Then I changed jobs, escaped the “Microsoft ghetto”, and largely stopped caring what happened with the .Net platform; but I still wanted a sort of nice free software equivalent of what I’d wanted before.

Then Sun released Java under the GPL, and I totally stopped caring what happened with the .Net platform. But I did want, and still want, a mature functional programming language with good tool support, targetting the JVM.

I looked at Scala. Scala is a bit of a monster. I think Scala is going to be the Ada of the 21st century, and unfortunately not in a good way. But we’ll see.

I looked at Clojure. Clojure’s a really nice language, crisp and LISP-y. I still prefer Haskell/ML/OCaml-ish syntax, though…

This evening I converted some of my old Haskell code for generating Polyominoes to F#, compiled and ran it on the CLR. That is my original dream come true, pretty much. The tool support in Visual Studio 2008 is superb, with working intellisense and (inferred) type signatures popping up every time you hover over something. I would have completely wet myself over it two years ago.

Which raises the question: given that Mono 2.0 will run the byte-code output by the F# compiler, and run it on Linux too, how much do I really care that Microsoft happen to have made the best IDE for coding in F#, or that the compiler itself (while freely available) isn’t open source? Hmmm…

My gut feeling is that Microsoft Research have come up with something really special in F#, and that the language has a real future ahead of it. It may well very soon become the language to put on your CV if you want smart people to come looking for you.

2 Responses to “Gflat”

  1. Alexy Says:

    Absolutely — and you’ll be up there in the search results list, due to early blogging! :) I run F# insude a VMWare Fusion on my Mac. Mono is slow, Monodevelop wouldn’t build right away, although a while ago it did, but it lacked F# bindings. Now it does, apparently, — when I build it, will check.

    But, however much I heard Visual Studio praised, I’m a lifelong Linux-Mac-Emacs-TextMate guy, and am lost in VS — how’d you recommend to start using it?

  2. Dominic Says:

    Tricky one – I got very used to VS a few years ago when programming C#, and so it all seems blindingly obvious to me now. To be honest, though, when writing the polyominoes code I was using it as a glorified text editor with nice syntax highlighting, and the intellisense and automatic type-error detection just came as a pleasantly-surprising bonus feature. I don’t know that there’s much yet in the way of refactoring support, for example…

Leave a Reply