[Haskell-cafe] H98, OOHaskell - getting started with objects in Haskell

Erik de Castro Lopo mle+hs at mega-nerd.com
Thu Jan 13 00:49:40 CET 2011


gutti wrote:

> I wanted to check whether Haskell offers reasonably easy object oriented
> programming

If you really insist on doing OO programming in a functional
language you may want to look at Scala and Ocaml, both of
which have proper OO additions.

I haven't used Scala myself but have done quite a bit of coding
in Ocaml. My adivce for anyone coming from an imperative OO
language to Ocaml is to avoid the OO stuff to start with and
learn to write good, clean, pure functional code before starting
to use references and OO.

The only time I ever used objects in Ocaml was when I was writing
code that used Ocaml's GTK+ GUI widget set bindings. These bindings
expose classes/objects to the programmer so the programmer has to
use OO.

Erik
-- 
----------------------------------------------------------------------
Erik de Castro Lopo
http://www.mega-nerd.com/



More information about the Haskell-Cafe mailing list