From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id UAA00076; Fri, 16 Apr 2004 20:52:54 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id UAA00159 for ; Fri, 16 Apr 2004 20:52:52 +0200 (MET DST) Received: from calmail-cl.berkeley.edu (mailfarm.Berkeley.EDU [128.32.61.106]) by nez-perce.inria.fr (8.12.10/8.12.10) with ESMTP id i3GIrtjq005905 for ; Fri, 16 Apr 2004 20:53:55 +0200 Received: from [64.162.212.212] (HELO tallman.kefka.frap.net) by calmail-cl.berkeley.edu (CommuniGate Pro SMTP 4.1.8) with SMTP id 17608394; Fri, 16 Apr 2004 11:52:50 -0700 Received: by tallman.kefka.frap.net (sSMTP sendmail emulation); Fri, 16 Apr 2004 11:51:55 -0700 Date: Fri, 16 Apr 2004 11:51:55 -0700 From: Kenneth Knowles To: skaller Cc: Richard Jones , caml-list@pauillac.inria.fr Subject: Re: [Caml-list] Conditional Compilation (was mod_caml Makefile) Message-ID: <20040416185155.GA27591@tallman.kefka.frap.net> References: <20040415224657.GB4352@swordfish> <20040416081117.GA21063@redhat.com> <20040416164903.GE4352@swordfish> <20040416171206.GF4352@swordfish> <20040416171708.GA29995@redhat.com> <20040416172726.GC27407@tallman.kefka.frap.net> <1082140344.20063.157.camel@pelican.wigram> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1082140344.20063.157.camel@pelican.wigram> User-Agent: Mutt/1.5.6i X-Miltered: at nez-perce by Joe's j-chkmail ("http://j-chkmail.ensmp.fr")! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; knowles:99 caml-list:01 2004:99 camlp:01 camlp:01 laughing:01 python:01 unsafe:01 ocaml:01 caml:01 configure:02 makefile:02 o'caml:02 o'caml:02 wrote:03 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Sat, Apr 17, 2004 at 04:32:25AM +1000, skaller wrote: > camlp4 has conditional compilation.. and lots more :D > but it only works with Ocaml .. Oh, cool, I'm not really hip to camlp4. > In general the answer is the same as I keep giving: > if you have a general purpose language and use it > as a code generator, the very notion of 'conditional > compilation' as some kind of special feature makes > you roll on the floor laughing. > Its a programming language, of course it has > conditionals! Well, right. A build-time script, whether python, O'Caml, or whatever can generate code (or generate another program to generate another program to generate code), but that's no fun. I'd much prefer a mini language that takes valid O'Caml in and is guaranteed to spit valid O'Caml out. I suspect camlp4 is what I want. If I really needed a code-generator I'm always free to use my configure script to do it, that is just a relatively feature-bare and unsafe approach. Kenn ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners