[Haskell-cafe] Re: Haskell vs OCaml

John Goerzen jgoerzen at complete.org
Tue May 3 13:48:59 EDT 2005


On 2005-05-03, Daniel Carrera <dcarrera at digitaldistribution.com> wrote:
> Marcin just mentioned OCaml as another functional programming language I 
> should keep in mind.
>
> Can anyone offer an opinion on how Haskell and OCaml compare? Is OCaml 
> as easy to learn as Haskell? Does it have much the same virtues?

I learned OCaml before learning Haskell.

I'd say that there are probably no features OCaml has that Haskell lacks
that are worth mentioning.  Haskell seems to have a lot more useful,
cool things than OCaml.

The type systems are very similar fundamentally.

OCaml has a very dated "feel" with both its syntax and its cumbersome
build system.  As much as people complain about I/O in Haskell, OCaml
has one of the worst I/O interfaces I've ever seen.  The OCaml standard
library does not even permit a single file to be open Read/Write, and
an input handle is a completely different type than an output handle.

OCaml does, however, usually compile to a faster executable than Haskell
does.

Also, it has better tutorials for people coming from a traditional
imperative background.




More information about the Haskell-Cafe mailing list