5 ms·
Can anyone speak to the pros/cons of learning OCaml vs Haskell? They seem comparable in some respects, but it feels to me as if Haskell has more momentum and pr
by tmountain 12y ago
Can anyone speak to the pros/cons of learning OCaml vs Haskell? They seem comparable in some respects, but it feels to me as if Haskell has more momentum and presumably a more active community. Am I correct in this assumption?
- antics 12y ago(Author here) I love Haskell. Love it to death. I see RWO as a justification of OCaml's language choices from the perspective of system deployment. It gives you a good start on the knowledge you'd need to push an OCaml system into serious production. I do not see how to get the same knowledge for Haskell. Particularly the runtime is a black box to me. This might be acceptable for your use cases, but for me, this is the primary risk of Haskell. re: community, It's probably true that Haskell so far is more prominent than OCaml right now, I would be careful to avoid making the mistake of assuming that this means people actually know how to deploy this for serious, scale production systems. Because it is not obvious that this is true. Besides, while the OCaml community is not as noisy, they are certainly still around.
- happimess 12y agoThe Architecture of Open Source Applications, Vol 2 [1] has a great chapter on ghc, which includes a good look at the ghc runtime (section 5.5). [1] http://aosabook.org/en/ghc.html http://aosabook.org/en/ghc.html
- deleted 12y ago[deleted]
- toolslive 12y agoIn the popularity of programming languages list, http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html http://www.tiobe.com/index.php/content/paperinfo/tpci/index.... F# is number 13; ML is number 26; Haskell is number 38; OCaml is ranked below 50. So the ML family of languages is way more popular than Haskell, but is fragmented. Below are my impressions/experiences. In general, the languages themselves are excellent, but the standard libraries vary in quality, as do the tool chains. ML is eager by default, Haskell lazy. Otherwise, it's the same mindset (although some people will think Haskell went overboard on monads, some people think OCaml's libs aren't monadic enough) For example f# is excellent in all of the above, but is _challenged_ in the multi-platform aspect. OCaml's standard library is limited, but this is compensated with Opam. Considering OCaml on windows is simply looking for trouble. The OCaml compiler is good, but other tools are limited or a bit primitive (heap profilers, debuggers, performance profilers). The community is rather reserved, but very helpful. Haskell standard library is also limited (for example you ain't gonna jump far with the string implementation that's offered by Prelude, and Num is also warted). The toolchain is better than OCaml's. Also Cabal has libs for everything, but ymmv. The community is really gentle and eager to help. ML, sorry no experience, most other flavours seem dead or quiet. MLton is a really interesting compiler.
- toolslive 12y agoI forgot: learning a statically typed functional language will make you a better developer. There is a catch though: some people will just refuse to go back to the normal Java, C++ or python insanity.
- codygman 12y agoHaskell does make Java and python a bit depressing to go back to for me, yes.
- rtpg 12y ago>In general, the languages themselves are excellent, but the standard libraries vary in quality, as do the tool chains. ML is eager by default, Haskell lazy. Otherwise, it's the same mindset (although some people will think Haskell went overboard on monads, some people think OCaml's libs aren't monadic enough) I think it's important to point out that Haskell is actually functionally pure (in that there are no side effects in the language), whereas ML does have references baked into the language, so you can revert back to writing Pascal-looking inner loops in Caml, for example.
- e12e 12y agoI find it a bit curious to contrast Haskell and ML -- maybe it's because I did a course on programming languages twice, first with Standard ML as (one of) the "functional" languages, and again when Haskell had taken over that role (the course first (extensively) used Sethi's "Programming Languages"). I've always seen Haskell as a kind of ML off-shot, but perhaps the similarity is more in the syntax than in the substance?
- IvarTJ 12y agoYou can run Ocaml on the Raspberry Pi for one.
- e12e 12y ago> You can run Ocaml on the Raspberry Pi for one. Huh, I don't have a pi, but judging (blindly) by: http://www.haskell.org/haskellwiki/Raspberry_Pi http://www.haskell.org/haskellwiki/Raspberry_Pi That should be "You can run the Ocaml toplevel on the Pi"?
- LeonidasXIV 12y agoAlso, Raspbian Wheezy includes a rather old GHC which is troublesome if you want to install packages from Hackage and backporting a newer GHC doesn't seem to be possible, it crashes some hours into the build process (which also takes ages).