caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: skaller <skaller@users.sourceforge.net>
To: Kenneth Knowles <kknowles@berkeley.edu>
Cc: caml-list@pauillac.inria.fr
Subject: Re: [Caml-list] Conditional Compilation (was mod_caml Makefile)
Date: 17 Apr 2004 06:37:03 +1000	[thread overview]
Message-ID: <1082147822.20063.279.camel@pelican.wigram> (raw)
In-Reply-To: <20040416185155.GA27591@tallman.kefka.frap.net>

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


  reply	other threads:[~2004-04-16 20:37 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-04-15 22:46 [Caml-list] mod_caml Makefile Matt Gushee
2004-04-16  8:11 ` Richard Jones
2004-04-16 16:25   ` Ranjan Bagchi
2004-04-16 16:49     ` Matt Gushee
2004-04-16 16:53       ` Richard Jones
     [not found]       ` <Pine.LNX.4.58.0404161000290.14222@manjula.frotz.bogus>
2004-04-16 17:12         ` Matt Gushee
2004-04-16 17:17           ` Richard Jones
2004-04-16 17:27             ` [Caml-list] Conditional Compilation (was mod_caml Makefile) Kenneth Knowles
2004-04-16 18:32               ` skaller
2004-04-16 18:51                 ` Kenneth Knowles
2004-04-16 20:37                   ` skaller [this message]
2004-04-17  0:39               ` Shawn Wagner
2004-04-17  8:46                 ` Martin Jambon
2004-04-16 16:49     ` [Caml-list] mod_caml Makefile Richard Jones

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1082147822.20063.279.camel@pelican.wigram \
    --to=skaller@users.sourceforge.net \
    --cc=caml-list@pauillac.inria.fr \
    --cc=kknowles@berkeley.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).