English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
Ocaml, a practical functional language?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2008-09-01 (16:37)
From: Peng Zang <peng.zang@g...>
Subject: Re: [Caml-list] Ocaml, a practical functional language?
Hash: SHA1

On Saturday 30 August 2008 03:50:30 pm circ ular wrote:
> I have tried a lot of languages but never really felt 100% satisfied.
> I really like Python, it makes me very productive but Iwant something
> a little more functionally oriented plus a static(optionally declared)
> typesystem.
> I tried Haskell and I really like it but I find it hard to get used to
> some things(like no destructive updates of datastructures outside the
> IO Monad).
> Ocaml seems a little bit more practical and it is aslo very fast(well
> haskell is too).
> tried lisp at first but libraries and documentation just werent up to
> standards there either.
> so far Pytho is the best Ive found (for me) but still isn't satisfied.
> could ocaml be what I look for?

I think OCaml is what you are looking for.  I went through a similar search 
for a comfortable language.  My order was a bit different, lisp first, then 
python, then OCaml, then played a bit with Haskell but am sticking with 

I find OCaml to be a great compromise.  Haskell is cool, but it forces you to 
do things in certain ways and use a lot of abstraction which often seems 
overkill, making simple things much harder than they should be.  I really 
like how easy things are in Python but large programs I find are impossible 
to maintain because it's not statically typed (it's also slow.. but that 
might have been ok).  Lisp is really great with what you can do and many 
simple things are simple, but it doesn't have the scaffolding to let you 
scale up to big stuff (missing libs and stuff).  OCaml has been great.  It 
has its drawbacks and yucky corner cases like all languages.  Overall though, 
it's been good and I've been able to find reasonable workarounds for things I 
don't like.  I encourage you to give it a serious try.

There's a great book on OCaml here:


The best emacs mode for ocaml is tuareg mode here:


I also write some additional on top of tuareg mode to be more like the SLIME 
mode for lisp but it's alpha (mostly because I wrote it for myself and 
packaging it and making robust is a lot of work that I'm too busy to handle) 
so I don't really recommend it yet.

Version: GnuPG v2.0.7 (GNU/Linux)