4 ms·
>It's an "or", not "and necessarily". Yeah, but what I am saying is that you put the same people on both sides. Virtually everyone in haskell land is a C fan,
by asdasf 13y ago
>It's an "or", not "and necessarily".
Yeah, but what I am saying is that you put the same people on both sides. Virtually everyone in haskell land is a C fan, it was a recent topic of discussion actually.
>Ocaml is more pragmatic than Haskell, in my opinion
There's a reason the haskell community is far larger than the ocaml community, and that the tools and libraries for haskell are way ahead of those for ocaml. From a purely pragmatic perspective, haskell is a far more useful language than ocaml. I say this as someone who switched from ocaml to haskell for entirely practical reasons.
>Eagerness is more practical than laziness
No it isn't. In 95% of cases it isn't relevant. In the other 5%, you want to use the right one. For practical purposes, it does not matter if a language is lazy by default or strict by default, as long as it is easy to do the other one. Ocaml makes it easy to do lazy, haskell makes it easy to do strict.
>refs more practical than e.g. state monads
Refs are not comparable to state monads. They are comparable to IORefs, or MVars, or TVars. Which are more useful than ocamls refs. A state monad is an extra thing ocaml simply lacks altogether.
>so correct me if I'm wrong, but my impression is that OCaml is in most senses an impure superset of Haskell
Not at all. Ocaml and haskell share a similar subset, but both have large area the other doesn't. There is very rarely a simple translation from haskell to ocaml, as ocaml is missing so many things that are commonly used in haskell code. There is more often a simple translation from ocaml to haskell, as idiomatic ocaml rarely uses objects. First class modules is generally the issue with translating in that direction.
>http://jxyzabc.blogspot.com/2009/03/haskell-vs-ocaml-or-ravi.. http://jxyzabc.blogspot.com/2009/03/haskell-vs-ocaml-or-ravi.... echoes my impression.
Yes, and it repeats the same weird memes about haskell that don't actually make any sense to someone who has used haskell for a non-trivial project. Like "needing monads for state".
- beagle3 13y agoOk then, I stand corrected. What would you recommend as a good Haskell text for someone who's gone through learn you a Haskell (and countless other tutorials, which all seem to be fixated on Monads and do a bad job at it)? And, which non trivial but not too big project would you recommend I study to get an idea of good pragmatic Haskell practices?
- asdasf 13y agoI probably can't help you much there, I think LYAH is pretty good. Are you trying to avoid learning monads, or you want a different approach to learning them? I think this is the best explanation of monads: http://blog.sigfpe.com/2006/08/you-could-have-invented-monads-and.html http://blog.sigfpe.com/2006/08/you-could-have-invented-monad... GHC itself is a good example project to look at, the base libraries tend to all be pretty idiomatic. Xmonad is a good option too.