4 ms·
I can't really usefully answer that question without knowing more about what your purpose is. If your purpose is to learn how to program in a functional style,
by avsm 12y ago
I can't really usefully answer that question without knowing more about what your purpose is.
If your purpose is to learn how to program in a functional style, then either language is fine. Other than that, the main difference between the two is purity/effects, lazy/strict, and type-classes/modules in Haskell and OCaml. That all changes the specifics of the code being written quite dramatically.
- pekk 12y agoI was asking about the exact uses murbard2 detailed, for which murbard2 thought OCaml was not ideal... not asking which language I should learn to understand functional programming
- mercurial 12y agoYour question was phrased incorrectly, though. Anyway, I'm not sure what murbard2 is objecting to. The only thing I got is "Functional programming languages shine when they deal with complex, recursive data structures, not for simple tasks which are primarily IO and need to handle many cases." Well, OCaml-the-language does IO perfectly fine (even if you want to augment/replace the standard library, which admittedly does few things "perfectly fine"), and languages with algebraic datatypes are very good at handling "many cases" in a typesafe way.