Browse thread
[Caml-list] mod_caml Makefile
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | skaller <skaller@u...> |
| Subject: | Re: [Caml-list] Conditional Compilation (was mod_caml Makefile) |
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