Re:The Future of Standard ML (2013) [pdf]
by coolsunglasses on Thursday July 14, 2016 @04:35PM
(#12096967)
Learning SML isn't going to help as much with Haskell as you might think. The others, yes.
[ Parent
| on HN ]
Re:The Future of Standard ML (2013) [pdf]
by eatonphil on Thursday July 14, 2016 @05:29PM
(#12097310)
I have ~4 years experience writing OCaml, and ~1 year experience writing Standard ML. I also once did contracting for a Play app in Scala for 3 months. A month ago, I started looking into Haskell for the first time for another side project and was immediately able to pick it up due to how similar it is to OCaml and Standard ML. In particular, the type syntax and function declarations are similar; understanding monads in SML/OCaml helps understand... everything in Haskell; and understanding of modules/functors/signatures transfers indirectly to type classes as well. (Here is a paper going into even more detail [0].) It felt like Haskell has some of the syntactic sugar I always wished Standard ML had as I learned its limitations.
[0] http://www.cse.unsw.edu.au/~chak/papers/modules-classes.pdf
If you already know SML or OCaml, you'll pick up Haskell easier, but if you don't know them and want to learn Haskell, you're not taking a shortcut by learning SML or OCaml first.
Although I happened to learn OCaml first, I am actually arguing that learning SML is a better way to learn the concepts behind tremendously more complex and less user-friendly languages like OCaml and Haskell. I don't know if I'd say it's a shortcut, but it's pretty natural to learn by studying a simpler (perhaps historic) topic before studying a more modern and complex one.
Re:The Future of Standard ML (2013) [pdf]
by dtornabene on Friday July 15, 2016 @01:38AM
(#12099143)
Its whatever works for every person, but I'll throw in my own experiences and say, that by taking a detour into Ocaml I was actually greatly aided in understanding Haskell. And that having spent a great deal of time with a number of Lisps. I had grabbed a copy of RWH, dug into it, been a little defeated at first, took a studious detour through RWOcaml and have returned to Haskell with a clearer view. Again, to each their own, my own experience was actually the opposite of your statement.