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
what do I need to know to understand camlp4
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2010-09-23 (19:50)
From: ben kuin <benkuin@g...>
Subject: Re: [Caml-list] what do I need to know to understand camlp4
> If you are new to OCaml,
I'm not actually new to OCaml, but although  I've read every notable
book about OCaml and a lot of good code of other OCaml programs, OCaml
is still very foreign and counter-intuitive too me.

I know what you're might thinking now: why the hell does he still bother?

The 'problem' is that every time I read something in Python or worse
in Java/C++ I instantly miss the lightweight types/pattern matching
facility the ability to easily pass functions around. Then I read
functional Ruby or Scala code, and I begin to hate fp because in these
context it only makes the code harder to read.

So why does the whole world tries to hammer some functional features
into his imperative language? Why not maximize the imperative features
of a functional language? I know only one big project where the
explicitely use an imperative style in ocaml? But this code looks
(syntax wise) still too much functional for my taste.

> with its syntax (somewhat quirky[1], I admit).
For me it's worse, the syntax doesn't look quirky, but rather random
too me. It's not like cpp where the syntax is utterly pragmatic,
without any aesthetic claim. In OCaml it feels like someone
deliberately neglected the syntax.

> [1] Compared to other programming languages. I know the syntax is > the way it is for precise reasons (currying, closer to mathematical
> notation, ...).
Would you mind to list a few mathematical subjects that help me to
understand OCamls syntax?

thanks a lot