[MLton] Separate compilation
Chris Clearwater
chris@sharkzone.com
Sat, 31 Jan 2004 17:29:50 -0700
Hi, I recently filled out the 2004 survey and noticed you are
considering making a byte code compiler for faster incremental
compilation. I am curious as to what barriers there are currently to
implementing optional separate compilation. I am aware of polymorphic
functions, but it seems like that could be solved by compiling
polymorphic functions to accept an extra record containing the
necessary information for each type variable and leaving the types
unboxed. Could the GC make use of this extra record as well? Also,
there is the issue of functors, but it seems these could be compiled
straightforwardly into functions taking records and producing
records. This appears possible even as an SML -> SML
transformation. Also, the presence of the C -> SML FFI leads me to
believe that you can already keep intact entrance points for arbitrary
functions despite all the super-optimization voodoo :) I imagine once
these are implemented you could pretty trivially implement all kinds
of other things such as dynamic loading and linking, both very
important in certain programming domains. This would also eliminate
the dependence on SML/NJ as compilation wouldn't be so slow for
development. Am I missing anything?