[Haskell-cafe] Re: Haskell vs OCaml

Marcin 'Qrczak' Kowalczyk qrczak at knm.org.pl
Tue May 3 19:37:45 EDT 2005


Michael Vanier <mvanier at cs.caltech.edu> writes:

> I also learned ocaml before learning haskell, and the biggest single
> difference I found is that haskell is a lazy, purely functional language
> and ocaml is a strict, "mostly functional" language.

Indeed.

In contrast to this one, my differences were not inherent in the
languages - I think most of them could be ported to the other language
without conceptual difficulties and without changing its core properties
(they don't depend on purity/impurity nor laziness/strictness).

> Another big difference between ocaml and haskell is that haskell has type
> classes and ocaml does not.

OCaml people recognize this but said that it's too big piece of
design, it would complicate OCaml type system too much. Especially
as sometimes modules or objects can be used for the same purpose,
it would increase the overlap of OCaml features.

There is some experimental design of overloading, called "generics"
there (someone has said that languages use the term "generics" for
"the kind of polymorphism we didn't have"). I didn't like it, or
perhaps I didn't understand it enough; it was less expressive than
type classes, you couldn't extend a given function in several modules
independently and then combine all extensions.

-- 
   __("<         Marcin Kowalczyk
   \__/       qrczak at knm.org.pl
    ^^     http://qrnik.knm.org.pl/~qrczak/


More information about the Haskell-Cafe mailing list