[MLton] MLton library project

Vesa Karvonen vesa.karvonen at cs.helsinki.fi
Fri Sep 29 05:56:54 PDT 2006


Quoting Henry Cejtin <henry.cejtin at sbcglobal.net>:
> I  think  that  one big decision to make is if the library depends heavily on
> itself. [...]

Well, if you mean that whether new libs are allowed to depend on old libs or not,
then I would say that it should definitely be allowed.  However, whether or not all
libraries should be combined into a single MLB file is another question.  I've
tried it both ways (many small MLBs and one big MLB).  From a theoretical POV,
I definitely prefer the many small MLBs approach, but it has a number of practical
drawbacks.  First of all you then need to write all those little MLBs and that
can be a lot of tedious work and requires lots of small files (i.e. it is quite
verbose).  Also, compile time with MLton seems to increase (significantly) with
that approach.  I don't know the exact reasons for this, but I'd guess that the
necessary namespace / environment management (although probably quick) isn't
free.  Most small MLBs would still refer to some other MLBs (e.g. the Basis lib)
to satisfy basic dependencies.  So, I'm currently using the one big MLB approach.

-Vesa Karvonen



More information about the MLton mailing list