Live data from Hacker News

Programming in Standard ML (2011) [pdf]

cs.cmu.edu

21–30 of 32 posts

Re: Programming in Standard ML (2011) [pdf]

#21
post #16

Earlier quoted context omitted.

I feel like ... SML is the better language but OCaml is the better runtime/community. Sad.

Not necessarily. E.g. SML has had multicore since forever. In OCaml it’s the hot new thing now, which probably needs some time in the wild before everything is ironed out.

Ok that's interesting, I hadn't realized the multicore story there was better.

Back when I was more into looking at this kind of thing (uh, 20 years ago?) I wrote a few simple programs in SML/NJ and far preferred its syntax to OCaml. But even back then, OCaml had more dev community momentum. (Actually Haskell seemed to have even more momentum but I never ever found it readable or comprehensible as a mere mortal.)

At the time for what I was doing, I really wanted... SML but without a garbage collector, operating for systems level programming. And so I was excited when Graydon Hoare started what became Rust. Which is what I prefer to work in these days.

Still, if I wanted a language for higher level development, I really would prefer to reach for something in the ML family of languages, they are just very expressive. But I wouldn't do this for paid employment work, too esoteric. Maybe that will change a bit now that Rust has brought some concepts and syntax from ML to the mainstream.

Re: Programming in Standard ML (2011) [pdf]

#22
post #16

Earlier quoted context omitted.

I feel like ... SML is the better language but OCaml is the better runtime/community. Sad.

Not necessarily. E.g. SML has had multicore since forever. In OCaml it’s the hot new thing now, which probably needs some time in the wild before everything is ironed out.

> Not necessarily. E.g. SML has had multicore since forever.

Can anyone say which implementation specifically?

Re: Programming in Standard ML (2011) [pdf]

#24
post #11

Whenever I see a Standard ML article/paper, it always reminds me that I still need to learn OCaml. Not that one is better than the other, just that I've not gotten around to learning OCaml yet.

Or Flix: https://flix.dev/

> Flix looks like Scala, but its type system is based on Hindley-Milner.

Ahh why?! Scala is FP larping as OOP. Great type system, poor syntax.

Re: Programming in Standard ML (2011) [pdf]

#25
I found the initial example of a regex package hard to follow. I don't know the language and am confronted with this example, that makes use of many advanced capabilities of the language.

Instead I looked for a book for beginners in Standard ML and found "Elements of ML Programming" to be quite good.

Re: Programming in Standard ML (2011) [pdf]

#26
post #17

Earlier quoted context omitted.

SML definitely has a nicer formal definition but OCaml has better performance and a lot more functionalities. I wouldn’t say SML is the better language but the syntax definitely is cleaner. Strangely I think SML focus on being well defined and tidy is why it never really took off. A language success is linked to its community and your features define who will want to join you. It seems to me that at the beginning it’…

> OCaml has better performance That statement needs some evidence. > a lot more functionalities Past a certain minimal threshold of needed functionality, I prefer a language not to have a couple good features than to have a really bad one, like implementation inheritance, particularly multiple inheritance.

[deleted]

Re: Programming in Standard ML (2011) [pdf]

#27
post #18

Does anyone here actually use SML for production or know of big projects (outside of academia) which uses it? Compared to other functional langauges, it doesn't seem as popular.

Anecdotally, most people use SML as part of academic projects and when they do to use it for commercial projects end up going to Ocaml or Haskell. That is because of the wider ecosystem of projects to support practical things like talking to databases, networking, etc. Also larger communities for documentation and help debugging issues that only come up once you start scaling out.

Re: Programming in Standard ML (2011) [pdf]

#29
There are some allusions here I think. The opening line of part 2, "All Standard ML is divided into two parts."

is a very strange English sentence to write. It actually sounds like the very famous opening line of Julius Caesar's "Commentary on the Gallic War" (which is prescribed as a model of Latin composition)

"All Gaul is divided into three parts..."

[1] https://en.wikisource.org/wiki/Commentaries_on_the_Gallic_Wa...

Re: Programming in Standard ML (2011) [pdf]

#30
post #18

Does anyone here actually use SML for production or know of big projects (outside of academia) which uses it? Compared to other functional langauges, it doesn't seem as popular.

I've used it for a handful of personal CLI applications. Not sure if that counts as "production," though.
Post reply on HN