3 ms·
This is what MLton essentially does as a system. It will expand away every module use such that they have no runtime overhead, but only exist in order to organi
by jlouis 10y ago
This is what MLton essentially does as a system. It will expand away every module use such that they have no runtime overhead, but only exist in order to organize code. This allows you to build software consisting of many small functors which are composed together to form the final program.
It is perhaps the reason to invest time in OCaml or Standard ML. But it requires a compiler which can reap the benefit as well. Newer versions of OCaml, with flambda as a backend, also help with this and gives you some of the advantages of full-module-expansion.
In practice, any decently sized OCaml or Standard ML program written by someone fluent in the module system would be an example project. Unfortunately, most of these I know about doesn't live in the Open Source world where I can just point to them.
(Disclaimer: I was involved somewhat with MLton)
- metafunctor 10y agoThere's the MLton Library project: https://github.com/MLton/mltonlib https://github.com/MLton/mltonlib