
On Sat, Dec 24, 2005 at 12:35:21AM +0000, Daniel Carrera wrote:
Now that I sort of understand Haskell, I was hoping someone could give me an opinion on OCaml from a Haskell POV. Both are functional and have fairly clear syntax. OCaml is supposed to be very fast, and Haskell perhaps is not.
When it comes to Haskell, speed is mostly an implementation issue. Of course, there are many problems with making Haskell programs run fast, but on the other hand there are also many opportunities. For example recent developments of GHC promise that Haskell will be one of the best languages to use on SMP / multicore systems.
Besides that, what else could you say about them? What would make someone prefer one over the other?
There are many differences (Haskell on the left): - strict (with strictness annotations) / non-strict (with some support for laziness) [read http://www.md.chalmers.se/~rjmh/Papers/whyfp.html to see why it matters] - pure / impure - both have a type system based on Hindley-Milner, but with radically different extensions (type-classes, GADTs vs. objects, polymorphic variants, labelled function parameters) - different module systems (simple in Haskell, full-blown in OCaml (but can be emulated in Haskell)) Some subjective differences: - functional / imperative (:-)) - higher order DSLs (monads, combinator libraries) are easy to define and use / are a bit cumbersome - pretty / ugly Best regards Tomasz -- I am searching for a programmer who is good at least in some of [Haskell, ML, C++, Linux, FreeBSD, math] for work in Warsaw, Poland