|
In IP and Compilers, we use Moscow ML, however, having worked with it for a bit, it seems to lack a lot of libraries that come with other implementations. Which of the major implementations are better for further development in SML, and why? |
|
Moscow ML is not a Standard ML compliant interpreter of Standard ML. Its main problem is that it regards floats as eqtypes and they are not. Furthermore, it does not implement the 2002 basis library. In addition to Troels suggestions, there is an often overlooked little gem, namely Poly/ML |
|
When you project grows beyond one file you will need some kind of build system. The standard format is MLB (1 chapter 15, 2). As far as I know, it is only used by the ML Kit compiler and MLTon. Those does not have a REPL. If you want that, I would say SML/NJ is your best bet. But then you're stuck with the Compilation Manager (3). One dirty trick I sometimes use is having a very plain MLB-file, then auto generate a file from it which just includes everything using some preprocessor (PreML (4) or CC for example). I then use this file directly in SML/NJ. This also overcomes one of the big drawbacks of CM: you can't bind anything at top-level. For a "library" kind of thing for SML/NJ I use Anyway, for "real" programs I strongly recommend MLTon and MLB. MLTon creates really fast executables but it takes its time to do it; There's a mode for Emacs which starts a new compilation of your project whenever you change a file (6). Stephen Weeks has also written some Elisp for parsing MLTon error messages (7). -- Morten In addition, Morten has made some slides, which explain the pros and cons of the different implementations. These can be found here. |
|
Another minor minus regarding Moscow ML is that it depends on the program "camlrunm" which does not allow commercial redistribution to take place. In a perhaps far out scenario, this might pose practical difficulties for DIKU students. A more direct problem/annoyance is that several popular GNU/Linux distributions do not include MosML in their repos of easy-to-install programs and libraries because of the no-commercial-redistribution clause. For example, Debian have chosen not to include MosML because it does not fulfill the requirements of the Debian Free Software Guidelines. This forces (lazy) students to manually download MosML from the internet through a web browser and waste valuable seconds figuring out how to follow the non-standard install instructions of MosML. |