Live data from Hacker News

Standard ML in 2020

notes.eatonphil.com

41–50 of 125 posts

Re: Standard ML in 2020

#41
post #31

Earlier quoted context omitted.

SML’s compilers and implementations are state of the art. Advanced optimizing compilers and multicore are already huge differentiators. Also, Standard ML is, well, standardized. The standard isn’t perfect but it at least allows for a strong ecosystem of independent implementations.

I was under the impression that ocaml’s optimization was pretty good. Granted multicore is not here yet.

Ocaml's optimization is very good, but not perfect. For example, if you need 32-bit integers instead of 31-bit integers, your performance is going to tank due to boxing.

MLton is a whole program optimizer (rather than function at a time like Ocaml) and wrings out a ton of performance though compile times are quite a bit longer.

Re: Standard ML in 2020

#42

Earlier quoted context omitted.

Not totally sure, but it's definitely not as active as the first three I mentioned. The last commit is from over a year ago [0]. Although the SML/NJ website shows releases presumably from 2020. [0] https://github.com/sml-nj/smlnj

There is a lot of active development going on in their SVN repository http://smlnj-gforge.cs.uchicago.edu/scm/viewvc.php/?root=sml...

They really need to go where the developers are...

Re: Standard ML in 2020

#43

As someone reasonably versed in OCaml but knows nothing about SML, what are primary differences? Given that OCaml has much better tooling and more of a community, what draws people to SML still?

SML is standardized which is useful if you want to build an implementation for academic purpose. I don't think anyone seriously uses it outside academia however.

Re: Standard ML in 2020

#44
post #2

Wait, what happened to SML/NJ? AFAIK it's still in development. Also, it has an absolutely "lovely" versioning scheme.

Not totally sure, but it's definitely not as active as the first three I mentioned. The last commit is from over a year ago [0]. Although the SML/NJ website shows releases presumably from 2020. [0] https://github.com/sml-nj/smlnj

This git repo is quite out of date. The best place to look for updates is the smlnj website: https://www.smlnj.org/

Re: Standard ML in 2020

#45
post #22

StandardML really hits a nice sweet spot in language design. The syntax is super-easy to learn (The BNF for the whole fits in a mere 2 pages[0]), but contains a lot of features in that small package. Rather than tacking on functional features (eg, Java with lambdas), these features have been carefully considered and streamlined and include bits like proper tail calls and currying. You get nice bits like actually soun…

> Despite this, the language doesn't have the academic flaws of its descendants like Haskell. Can you elaborate on what those flaws are?

One of my favorite rants on the practicality of Haskell vs ML.

https://existentialtype.wordpress.com/2011/05/01/of-course-m...

Re: Standard ML in 2020

#46

So I use F# and plan to look at rust in 2021 for my "compile to native code" toolset since .net is not everywhere and .net native appears to be moving very slow to release F# to native code support. should I consider taking a look at some description of standard ml instead of rust? It seems like rust has pattern matching and immutability which matches to F# pretty good? My use cases are mostly desktop class machines,…

OCaml would probably the easiest transition if you want native binary support, F# even has an OCaml compatibility mode.

Re: Standard ML in 2020

#47

So should I pick StandardML or OCaml?

SML is a nice language with a cleaner syntax and is standardized.

Still, my answer would be OCaml without questions. It has better tooling, better performance, a larger community, a larger ecosystem, more features and more work being done on it with basically no downsides.

Re: Standard ML in 2020

#48
Dumb question, but since there are many Standard ML implementations, do they all implement the same language? Or just variants/visions of the same language? And is there any standardization on any particular implementation?

Re: Standard ML in 2020

#49
post #48

Dumb question, but since there are many Standard ML implementations, do they all implement the same language? Or just variants/visions of the same language? And is there any standardization on any particular implementation?

It's like Common Lisp or Scheme: there's a formal spec and many implementations implement the spec. There's no reference implementation like CPython or MRI Ruby.
Post reply on HN