logoalt Hacker News

porcodatoday at 2:47 AM1 replyview on HN

I think mlton is the one to reach for if you want strict conformance to the SML'97 definition [1]. There's a page on the MLton site that describes where SMLNJ deviates from SML'97 [2].

I'm surprised Gemini says SML/NJ its the most widely used. I've been an active Standard ML user for close to 30 years, and while that was certainly true for the first half of that time, I found most projects around me drifted to defaulting to want to compile with mlton or polyml. SML/NJ's heap2exec was a bit clunky compared to the others. It's great that they're slowly moving it over to LLVM.

[1] http://www.mlton.org/Features

[2] http://mlton.org/guide/20051202/SMLNJDeviations


Replies

momentoftoptoday at 6:18 AM

I understood that MLton was mostly about performance. It does whole program optimisation and is prepared (or does?) monomorphise just about everything, and applies all of your functors at compile time, so that you've got something more like C++ templates but well-typed.

> SML/NJ's heap2exec was a bit clunky compared to the others.

Unlike the others, SML/NJ implements call/cc, so it's going to need to do something funkier.

   SMLofNJ.Cont.callcc

   > val it = fn : ('a ?.Cont.cont -> 'a) -> 'a