httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adam Sah <a...@inktomi.com>
Subject Re: Config file `programming language'
Date Thu, 19 Dec 1996 18:46:16 GMT
The Tcl community has had good experiences with using a Turing complete
   config files; I think there was a paper in the Tcl'94 conference on the
   pros and cons.  The upsides are pretty big; the downsides I've experienced
   are:

 - slows down startup time.
   This can be mollified by using a faster scripting language, or by coaxing
   users into not doing dumb things, ie. print out the startup time.

 - startup can fail because of bugs in the config scripts.  
   ...and some users may not be studly enough programmers to fix the
   bugs... similarly, people have to agree on the scripting language, often
   the source of religious fervor.

 - config scripts cannot be parsed.
   In general, the only way to meaningfully "parse" a config script is to
   eval it against a virtual machine that (mostly) implements the scripting
   language.  In the case of Tcl, Lisp, Scheme, etc., this isn't a big
   burden, because their syntax is so "light" and its VM is so flexible:
   everything looks like a funcall, and everything can be redefined(*) for a
   given VM.  Perl, C, C++, etc. aren't so malleable...

   (*) either by a macro (Scheme, Lisp) or by stomping the procname (Tcl).

adam

..tear.along.dotted.line......................................................

> I was thinking about the earlier discussions about creeping featurism
> in the conf syntax leading to the ad hoc creation of a full blown
> programming language -- and the obvious pitfalls thereof -- this
> morning.  Especially for places that have lots of virtual servers,
> macros in the conf files would be a big win.
> 
> But why re-implement the proverbial wheel?
> 
> What do ppl think of an option to run the conf file (presumably
> excluding htaccess files) through m4(1)?
> 
> That would certainly provide me with everything I need -- or at least
> that I can think of. :)
> 
> 
> Obviously a post 1.2 change, but if I don't suggest it now I'll
> probably forget about it....
> 
> -JimC
> -- 
> James H. Cloos, Jr.         <URL:http://www.jhcloos.com/~cloos/>
> cloos@jhcloos.com           Work: cloos@io.com
> LPF,Usenix,SAGE,ISOC,ACLU   FB C2 B3 7A 50 44 AE 2D  C7 4C 1E C1 EF 7A FB 30
> 


Mime
View raw message