[MLton] Hmmm.... ML

skaller skaller at users.sourceforge.net
Sat Oct 21 19:07:21 PDT 2006


On Sat, 2006-10-21 at 10:32 -0700, Daniel C. Wang wrote:

> we should just just give up 
> on SML. Because if we can convince people to use SML for this 
> application what can we convince people to use SML over Ocaml for!

There are two *distinct* issues here.

The first issue is language. Clearly SML is a bit archaic:
Ocaml is moving ahead. I use Ocaml's polymorphic variants
in my product, and that is one part of my code I would not
like to translate backwards to SML's weaker variants.

The second issue is performance. My interest in MLton
is that it is a whole program translator, focused heavily
on blinding speed. I have an interested in FFI support 
and concurrency too. MLton looks the best choice for
all these things .. but ..

* only people interested in serious performance would
  consider MLton

* all such people either use 64 bit multi-core processors
  or would surely like to!

There is a further thing I would note on choice of translator.
GHC, MLton and Felix are PUBLIC development projects.

Ocaml on the other hand is not: the sources are open, anyone
can make libraries, but the compiler is developed by a 
closed community of paid developers (Inria team).

This model does allow focus and maintenance of production
quality -- but it is a continued source of frustration
for users that they cannot contribute. For example
one of the primary motivations for the Felix project
is the failure of Ocaml to support dynamic loading
and the ability to generate standard  binary shared 
libraries.

People that do this:

  "we'll be using OCaml extended with first-class continuations"

will crash and burn unless they have close ties to the 
'old boys network'. They have to fork the project, and thus
eventually loose the advantages of sharing bugfixes, upgrades,
etc etc.

OTOH MLton encourages people to develop stuff like extra optimisation
passes and I perceive people would help fold a successful branch
into the main code base.

However there's resistance to language extensions .. and that's
a problem IMHO: Ocaml is being upgraded all the time, and so 
is GHC. 

The bottom line is really this: to survive a compiler project
needs around 100 users. Ocaml has that. Most (CS) academics requiring
a programming language will choose C, C++, Java, Ocaml or GHC.
To get MLton in that list, it is not enough to rely on the fact
it implements Standard ML .. because no one really cares about
Standard ML.

Both GHC and Ocaml are driven forward by a combination of active
researchers pursuing improved features, typically advancements
in type systems, together with an 'educated' collection of
industrial programmers eager for a high quality advanced programming
language as a way to gain a competitive advantage over people
stuck with junk like C, C++ and Java.

FWIW I think it is typical the political radicals always fight
more amongst themselves than against their real enemies :)

-- 
John Skaller <skaller at users dot sf dot net>
Felix, successor to C++: http://felix.sf.net



More information about the MLton mailing list