[MLton] F# - the future of ML?

Wesley W. Terpstra wesley at terpstra.ca
Mon Dec 18 16:29:03 PST 2006


I realize this is a bit off-topic, but wanted the opinions of the  
people on this list. :-)

I ran into F# over the weekend and was quite impressed! I've not  
heard it mentioned here. As introduction, it's Microsoft's  
implementation of OCaml for .NET. I tried porting a couple CPU  
intensive pieces of SML code and found that F# was only about 70%  
slower than MLton.

Performance aside, what I think is the real strength of F# is that it  
gets immediate access to all the .NET libraries. Using them feels  
"natural". Also, the object model of OCaml got dumped in favour of a  
more C++ (or I suppose C#) version which I found a reasonable fit.  
As .NET 2.0 has generics, it is possible to nearly seamlessly  
interact between C# and F# in both directions. The other benefit is  
that with mono you get portability almost for free.

The downsides (at the moment) are: no functors and slower than MLton.

I don't much like the OCaml inspired mllib (I really miss vectors and  
slices!), but what I saw seemed a very promising approach: piggy-back  
on a parent project. It seems to me that this approach has a lot more  
staying power than either MLton or OCaml. The libraries are there and  
continually evolving by virtue of the parent project. The  
interoperability makes it easier for new programmers to get their  
feet wet after being introduced via the parent project. It (mostly)  
frees the language developers from worrying about all the possible  
target platforms; the parent deals with that.

Thoughts?




More information about the MLton mailing list