Here are the nice things we would like to have from an ML compiler:
It compiles quickly.
It produces good error messages.
You can debug your code interactively.
The compiler generates a binary you can run on the command line.
The generated binary might even be fast (not so important for us).
But we can’t have nice things: there is no one compiler that does it all. For this reason, I recommend that you install three compilers. (All three are already installed on the department servers.)
The Moscow ML compiler compiles quickly and generates a binary you can run on the command line. The error messages are so-so. Interactive debugging is possible, but with so many modules, I don’t know how to make it easy.
One other issue with Moscow ML: its Standard Basis Library is out of date, so some simple functions like
List.concatMap
are missing.If you can install only one compiler, Moscow ML should be it.
MLton has great error messages and generates fast, native-code binaries. But it takes a long time to compile, and it cannot be used interactively.
MLton is worth installing just for the error messages. Don’t wait until you’re frustrated by a cryptic error message; install MLton now.
Standard ML of New Jersey compiles reasonably quickly and incrementally. The error messages are adequate, and interactive debugging is a snap. Generating a binary to run on the command line is possible, but it is much harder than just installing one of the other compilers that will do it for you.
Install SML/NJ if you need to debug your ML code interactively.
TL;DR: For fast compilation, Moscow ML. For good error messages, MLton. For interactive debugging and exploration, Standard ML of New Jersey.