3 ms·
Sometimes the absence of features is itself a feature. SML is a much smaller language than OCaml and F#. Offhand, I can't recall anything it has that OCaml do
by Athas 5y ago
Sometimes the absence of features is itself a feature. SML is a much smaller language than OCaml and F#. Offhand, I can't recall anything it has that OCaml doesn't, although it does some things differently (e.g. structurally typed immutable records).
I'm not sure there is much reason to use SML itself today, given that it has stagnated since the late 90s, but it is an excellent language for teaching programming because you don't have to sweep anything under the rug. But if you want to use it, then it does actually have well-maintained pretty good compilers. MLton probably generates faster code than OCaml and F# in many cases. The main problem with SML is that there are not a lot of SML programmers around, and hence very few libraries, particularly for handling modern protocols and formats.
- msh 5y agoMy first programming language when I started to study CS at university was SML using MoscowML (in 2001). It seemed like both I and a lot of other students had a lot of issues with it. It seems like the university agreed as they later moved away from it. Basic SML might not be hard to learn but you quickly have to go to concepts like recursion that is not a very easy concept to grasp for beginners. SML seems more suited for the theoretical mathematical (for lack of better words) parts of computer science rather than the more practical parts.
- Athas 5y agoWhat is impractical about recursion?
- msh 5y agoNothing, maybe I was unclear. My point about recursion was that it was hard for students just starting university to understand.
- qwerty456127 5y agoWhy? How can recursion be hard to understand? I don't understand.
- djur 5y agoThe difficult thing isn't the concept of a function being defined in terms of itself, but translating between iterative and recursive versions of the same algorithm. Recursive algorithms can feel "backwards" when you're used to iteration. Real-world procedures are much more likely to be described iteratively than recursively.