Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] Camlp4
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2002-05-17 (13:45)
From: Ohad Rodeh <ORODEH@i...>
Subject: [Caml-list] Camlp4

   I'm writing to check whether Camlp4 remains or not in the Caml

I have a 60000 line system written in Caml, and I was seriously considering
Camlp4 for conditional compilation of debugging versions of some of my


    While I don't develop Caml, I personally think that:
o Caml needs a preprocessor, at least for conditional compilation
o The preprocessor needs to be in the primary distribution (not as an
o Since there is a lot of code written in the old syntax, changing the
syntax is out
   of the question.
o The above point means that a preprocessor is needed to experiment with
    syntax without breaking the old syntax.


Ohad Rodeh
tel: +972-9-9527641
IBM Haifa, storage research

                      Christopher Quinn                                                                                  
                      <>         To:                                                                  
                      Sent by:                      cc:                                         
                      owner-caml-list@pauill        Subject:  [Caml-list] Re: Camlp4/OCaml                               
                      17/05/2002 02:22                                                                                   
                      Please respond to                                                                                  
                      Christopher Quinn                                                                                  

How can camlp4 be unimportant or a waste of time!

Here are some things I find useful about it:

o conditional compilation

o ability to add command line options to switch between one's own 'safe'
modules and their 'unsafe' versions which can only be done in the case
of Arrays and Strings with the standard compiler.

o one can always modify one's own copy of the parser,
but that's a bother when something in the original changes, and besides,
camlp4's extension mechanism allows a compact and manageable format.

o no matter how one redefines the syntax, just running the source
through camlp4 can reconstruct it in the vanilla form. So no one ever
needs to suffer another's idea of perfection!

o camlp4 seems to me to be one way to avoid the endless creation of
mini-languages for specific tasks that end up trying to do stuff beyond
their limited design. Better to start with the expressivity of the likes
of caml, maybe cutting down, and augment with p4 extensions. I'm
planning to embed some sql style DDL for my project.

o I can write code without_the_god_damn_awful_underscore character
stressing my hands and use-an-alternative-even

I felt these reasons were compelling enough to justify  switching to
camlp4 as my default parser.

The above doubtless has no bearing on the technical arguments for not
having camlp4 in the distribution.
I just want to say I think camlp4 is important and indispensible.

- chris

To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list:

To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: