5 ms·
Ocaml seems to get more buzz, but about 20 years ago I tried my hand at both OCaml and SML/NJ and found that I actually far preferred the latter. SML is a very
by cmrdporcupine 7y ago
Ocaml seems to get more buzz, but about 20 years ago I tried my hand at both OCaml and SML/NJ and found that I actually far preferred the latter. SML is a very nice, consistent, and practical language.
Here's a pretty thorough comparison of the two http://adam.chlipala.net/mlcomp/ http://adam.chlipala.net/mlcomp/
- alharith 7y agoOCaml has come many, many, many miles from 20 years ago, and continues to make improvements year to year.
- melling 7y agoSounds like multicore OCaml is finally nearing completion: https://discuss.ocaml.org/t/multicore-ocaml-january-2020-update/5090 https://discuss.ocaml.org/t/multicore-ocaml-january-2020-upd...
- pjmlp 7y agoGreat, although in the age of micro-services and threading exploits, being mostly mult-process isn't that bad.
- mhd 7y agoToday's there's also F#, which is the "" to Ocaml's ";;" and to SML's ";". Concurrent ML is definitely worth looking at.
- andrepd 7y agoI don't get the issue with ;; in ocaml, literally all it does is force evaluation in the repl. You will never write it in code.
- int_19h 7y agoDon't you also need it for top-level declarations in a file?
- wk_end 7y agoThey can (almost?) always just be inferred, I think (it's been a couple of years since I programmed in ocaml daily). I personally like using them anyway. If you've done something wrong I recall the parser can sometimes give better error messages if it has them around to orient itself. And for all the complaints people seem to have you really can grow to like them aesthetically - there's something pleasantly blocky and definitive about them I find, like the satisfying thock of a good keyboard.
- tom_mellior 7y agoNo.
- bjoli 7y agoConcurrentML has a outgrown its name. It is available in many different languages. I recall hearing Mike Sperber saying that his company usually just re-implemened it in whatever language they happened to work in that week. It is a really nice system that is similar to go, but the primitives it gives you are in a way a generalisation of go's concurrency primitives.
- throwaway17_17 7y agoCan you point me in the direction of any reading on this, I’d be interested to hear about it.
- the_why_of_y 7y agoThe canonical source is John Reppy's book: https://www.goodreads.com/book/show/302685.Concurrent_Programming_in_ML https://www.goodreads.com/book/show/302685.Concurrent_Progra... Intro article: https://medium.com/@asolove/synchronizable-abstractions-for-understandable-concurrency-64ae57cd61d1 https://medium.com/@asolove/synchronizable-abstractions-for-... There's an interesting series of blogs by Andy Wingo on comparing CML with Go and implementing it in Guile Scheme: https://wingolog.org/archives/2016/09/20/concurrent-ml-versus-go https://wingolog.org/archives/2016/09/20/concurrent-ml-versu... https://wingolog.org/archives/2016/09/21/is-go-an-acceptable-cml https://wingolog.org/archives/2016/09/21/is-go-an-acceptable... https://wingolog.org/archives/2016/10/12/an-incomplete-history-of-language-facilities-for-concurrency https://wingolog.org/archives/2016/10/12/an-incomplete-histo... https://wingolog.org/archives/2017/06/29/a-new-concurrent-ml https://wingolog.org/archives/2017/06/29/a-new-concurrent-ml
- davidgl 7y agoThe Concurrent ML library for F# is https://github.com/Hopac/Hopac https://github.com/Hopac/Hopac
- agumonkey 7y agoOcaml decided to be on the "large" while sml kept small it seems. I loved that trait (through Dan Grossman's MOOC). To the point that I found it even nicer to interact with than lisp.
- saityi 7y agoThe smallness of SML is a big part of why this is 'A Tour of Standard ML' instead of 'A Tour of OCaml' or 'A Tour of Haskell'. It's small enough to learn in a couple days (in my mind!), but it has all of the niceties of statically typed, immutable functional languages, so it provides a good introduction to those ideas. That said, I love how small it is, too. Every time I go back to SML, I find it refreshing how much power there is in a few simple ideas expressed well.
- agumonkey 7y agothe benefits, how I see them, is that the language never impedes your mind.. there are like 5 ideas, and the rest is pure thinking. but well I was acquainted to typed FP before, to some or the mere mortals (just kidding) it might look like a sad joke.
- nextos 7y agoML for the Working Programmer is also an excellent reference. It demonstrates the construction of a theorem prover. As a matter of fact, Isabelle was built with SML. There's also a famously concise intro to SML (in 22 pages!) by Mads Tofte: https://condor.depaul.edu/dmumaugh/readings/handouts/CSC447/tofte-tips.pdf https://condor.depaul.edu/dmumaugh/readings/handouts/CSC447/...
- yawaramin 7y agoWhat kind of stuff are you making with SML?