A few years ago, I had some time off from work and decided to spend the week learning *ML. I spent a bunch of time with Standard ML, including the entirety of the older version of the Harper book, and implemented a bunch of nontrivial toys in it.
In the end, after having covered the whole book, I became frustrated with the language and jumped ship (to Haskell with a quick stopover at OCaml). My main reason was fragmentation: SML/NJ, MLton, etc. all have somewhat different "standard" libraries, which means that in many cases you can't use libraries written for one compiler with another. I ended up having to choose which compiler and set of libraries I wanted per project in order to optimize the availability of libraries for that particular project, which is a frustrating experience. I'd rather learn the idiosyncrasies of one compiler than two.
Before jumping to Haskell, I dabbled in OCaml. I did not implement anything serious with it; rather, I went back and reimplemented a couple of the small toys I'd done in SML using OCaml. I decided that if I had to choose between one of these and the other, I'd probably end up going with OCaml: since there's only one major implementation, you won't run into the frustrating experience of trying to merge two disjoint but frustratingly similar ecosystems. To my sensibilities, however, OCaml is a bit uglier syntactically than SML. In the end, I just never clicked with OCaml, and decided that Haskell would scratch my itch better (and it has).
Having said all that, I don't mean this to imply that you shouldn't read this book! Reading Harper's book on SML made it much easier to pick up OCaml and Haskell, and I definitely consider it an excellent use of my time. SML is a really nice language and a good introduction to Hindley-Milner, but the SML ecosystem is something of a jungle and you'll probably get frustrated if you stay too long. The biggest thing going for SML vs OCaml, in my opinion, is that the syntax is just plain nicer.
Interesting. The parallels between ML and Scheme, two languages invented in the '70s and in an academic setting, are striking: the core language is great, but the community is divided into ever-so-slightly incompatible implementations, so, in practice, there's very little sharing. Therefore, it's impractical to do most "large" projects in the language, due to lack of critical mass of useful libraries. ML/Scheme end up being learning languages, for the most part, and then everyone moves on to {OCaml, Haskell}/Common Lisp to get real work done.
I would say these similar outcomes are a repudiation of the idea that multiple implementations of the same language is a good thing, but that hasn't hurt C's popularity. More likely, it has something to do with their roots in programming language research. Maybe ML and Scheme are too good for their own good, and other academics can't resist using them as a basis for their own pet ideas. Perhaps a truly successful (read, "widely-adopted") programming language has to be flawed just enough to discourage anyone from trying to improve on it. Worse is better strikes again?
Yeah, I concluded the same thing. Languages with standards seem to be largely worse off than languages with canonical implementations with regard to interoperability and ecosystem coherence. I think maybe the problem is that if your standard isn't restrictive enough to ensure general interoperability, you end up without it.
It seems strange that Haskell seems to be a special case to this, but even there you see language extensions that ghc supports but Hugs et al do not. It's just that, for most people, ghc just wins outright. SML/NJ vs MLton is a harder question to decide given the freakish performance that MLton can achieve.
Thanks for your take. I quite like OCaml---it's syntax is a bit quirky, but I guess I've used it enough that I've mostly stopped seeing the quirks. I've wanted to use Haskell for a larger project for a while now, but the right project hasn't presented itself.
I'm curious what industry you're in that you're able to make significant use of Haskell?
I'm curious what industry you're in that you're able to make significant use of Haskell?
Haha. I'm an integrated circuit designer. When I write Haskell, it's for my side projects or for some kind of optimization or signal processing problem.
Comments
A few years ago, I had some time off from work and decided to spend the week learning *ML. I spent a bunch of time with Standard ML, including the entirety of the older version of the Harper book, and implemented a bunch of nontrivial toys in it.
In the end, after having covered the whole book, I became frustrated with the language and jumped ship (to Haskell with a quick stopover at OCaml). My main reason was fragmentation: SML/NJ, MLton, etc. all have somewhat different "standard" libraries, which means that in many cases you can't use libraries written for one compiler with another. I ended up having to choose which compiler and set of libraries I wanted per project in order to optimize the availability of libraries for that particular project, which is a frustrating experience. I'd rather learn the idiosyncrasies of one compiler than two.
Before jumping to Haskell, I dabbled in OCaml. I did not implement anything serious with it; rather, I went back and reimplemented a couple of the small toys I'd done in SML using OCaml. I decided that if I had to choose between one of these and the other, I'd probably end up going with OCaml: since there's only one major implementation, you won't run into the frustrating experience of trying to merge two disjoint but frustratingly similar ecosystems. To my sensibilities, however, OCaml is a bit uglier syntactically than SML. In the end, I just never clicked with OCaml, and decided that Haskell would scratch my itch better (and it has).
Having said all that, I don't mean this to imply that you shouldn't read this book! Reading Harper's book on SML made it much easier to pick up OCaml and Haskell, and I definitely consider it an excellent use of my time. SML is a really nice language and a good introduction to Hindley-Milner, but the SML ecosystem is something of a jungle and you'll probably get frustrated if you stay too long. The biggest thing going for SML vs OCaml, in my opinion, is that the syntax is just plain nicer.
Interesting. The parallels between ML and Scheme, two languages invented in the '70s and in an academic setting, are striking: the core language is great, but the community is divided into ever-so-slightly incompatible implementations, so, in practice, there's very little sharing. Therefore, it's impractical to do most "large" projects in the language, due to lack of critical mass of useful libraries. ML/Scheme end up being learning languages, for the most part, and then everyone moves on to {OCaml, Haskell}/Common Lisp to get real work done.
I would say these similar outcomes are a repudiation of the idea that multiple implementations of the same language is a good thing, but that hasn't hurt C's popularity. More likely, it has something to do with their roots in programming language research. Maybe ML and Scheme are too good for their own good, and other academics can't resist using them as a basis for their own pet ideas. Perhaps a truly successful (read, "widely-adopted") programming language has to be flawed just enough to discourage anyone from trying to improve on it. Worse is better strikes again?
Yeah, I concluded the same thing. Languages with standards seem to be largely worse off than languages with canonical implementations with regard to interoperability and ecosystem coherence. I think maybe the problem is that if your standard isn't restrictive enough to ensure general interoperability, you end up without it.
It seems strange that Haskell seems to be a special case to this, but even there you see language extensions that ghc supports but Hugs et al do not. It's just that, for most people, ghc just wins outright. SML/NJ vs MLton is a harder question to decide given the freakish performance that MLton can achieve.
Thanks for your take. I quite like OCaml---it's syntax is a bit quirky, but I guess I've used it enough that I've mostly stopped seeing the quirks. I've wanted to use Haskell for a larger project for a while now, but the right project hasn't presented itself.
I'm curious what industry you're in that you're able to make significant use of Haskell?