113 points · by swatson741 · 3y ago · 44 comments
I think that it could have easily been my favorite dialect of ML if its standard library hadn't been so anemic even by 1990s standards. As it is, though, my AoC solutions tended to take a large effort, not because the problems were difficult to solve in the language, but because I ended up having to build up so many of my own algorithms and data structures. Fortunately, doing that in in SML is a genuine joy. But it still, sadly, renders the language irrelevant for just about any practical purpose nowadays.
Not much better on the browser though they seemed to have cleaned it up a bit since my last visit. Many years ago when I visited the website to download smlnj for class, I had to double and triple check the url and google/bing/etc the website to make sure it was not a spam site because of how barebones and amateurish the site looked.
> Which at first I kind of expected, until it said at the bottom it was updated in 2022.
I think the last update year is actually 2020. 2022 is the release year of the latest SMLNJ version. I think they could have layed it out better but smlnj is mostly for academic use so I'll let it slide.
I completely fell in love with the language, but I concur that the tooling is almost non-existent and the error messages that bubble up, leaves much to be desired.
It really is a wonderful language held back by a lack of good tooling and ecosystem, and well, users.
One of the things I like about the basis library is it's principled stance that if it doesn't require compiler support, host operating system support, is more efficiently implementable by the compiler than would be with an external library, or has clear proven utility it belongs in a separate library. This barrier for inclusion is to me at least undoubtedly good.
Personally I would split things apart further (kicking host OS support to a separate library from the basis, as I am inclined towards non-posix hosts where most of the API requiring host support isn't implementable). And kicking out any optional types/modules to separate libraries (where said library is then optional).
So while it is about as minimal a standard library as exists, (for my purposes at least) it sometimes feels like it contains too much. Given there is no language level support for things like conditional compilation of anything optional within the basis. These tend to be my gripes with the basis... not "it needs more things".
The main motivator for why I did this is because we use SML as a teaching language at my university and students always seem to struggle with the error messages and tooling from the compiler.
I learnt so much in my OCaml classes and really enjoyed programming with it.
* gadts
* first class anonymous modules
* functors (module level functors)
* polymorphic variants
* row polymorphism
* effect handlers
Although, I must confess, I haven't exactly kept up to speed on F# development. Perhaps F# has added some of these features recently?
It's not a perfect comparison, but, having spent some time dealing with all the unusual and surprising ways that some Scala language features interact with Java's type system, I tend to agree with the F# community on that point.
And the App Store still runs on a Java port of WebObjects to this day.
But as for other languages, there is pros and cons for each of them. I never tried F#, only Haskell and OCaml.
However in general, any would do.