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 WAA14716; Fri, 16 Apr 2004 22:37:11 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id WAA14233 for ; Fri, 16 Apr 2004 22:37:10 +0200 (MET DST) Received: from smtp3.adl2.internode.on.net (smtp3.adl2.internode.on.net [203.16.214.203]) by concorde.inria.fr (8.12.10/8.12.10) with ESMTP id i3GKb7YM015198 for ; Fri, 16 Apr 2004 22:37:08 +0200 Received: from [192.168.1.200] (ppp117-65.lns1.syd2.internode.on.net [150.101.117.65]) by smtp3.adl2.internode.on.net (8.12.9/8.12.9) with ESMTP id i3GKb3k2075442; Sat, 17 Apr 2004 06:07:03 +0930 (CST) Subject: Re: [Caml-list] Conditional Compilation (was mod_caml Makefile) From: skaller Reply-To: skaller@users.sourceforge.net To: Kenneth Knowles Cc: caml-list@pauillac.inria.fr In-Reply-To: <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> <20040416185155.GA27591@tallman.kefka.frap.net> Content-Type: text/plain Message-Id: <1082147822.20063.279.camel@pelican.wigram> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 (1.2.2-4) Date: 17 Apr 2004 06:37:03 +1000 Content-Transfer-Encoding: 7bit X-Miltered: at concorde by Joe's j-chkmail ("http://j-chkmail.ensmp.fr")! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 sourceforge:01 2004:99 knowles:99 camlp:01 python:01 interscript:01 autoconf:01 interscript:01 pervasive:01 python:01 9660:01 glebe:01 unsafe:01 unsafe:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Sat, 2004-04-17 at 04:51, Kenneth Knowles wrote: > I suspect camlp4 is what I want. It handles a wide class of syntactic problems. > 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. That depends on whether your configure script is bash, Perl, Python, or perhaps interscript. one problem with the autoconf approach which most such systems share is that they have this idea of a template and filling in the holes with configuration data. Interscript *inverts* that idea. It is entirely different. Generating code isn't a special thing you do for parts of your program you need to depend on the environment -- its universal. Everything is generated from the original sources. Instead, there is a default generation function: the identity 'copy this line of text', and instead of 'copying a template and filling in the holes' with an external program .. you put the code generation codes directly in the input where the holes are. >>From this perspective, generating code is anything but "feature bare", contrarily it is both pervasive and universally powerful. The 'raw text' approach of interscript is definitely unsafe -- partly because it is universally powerful. My suggestion is: by using Ocaml as the scripting language instead of Python, a good deal of safety can be restored. Static checking your build process can't be bad .. nor can higher order functions etc .. BTW: here is another thought: lazy evaluation. Seems applicable to building things .. -- John Skaller, mailto:skaller@users.sf.net voice: 061-2-9660-0850, snail: PO BOX 401 Glebe NSW 2037 Australia Checkout the Felix programming language http://felix.sf.net ------------------- 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