On Fri, 2007-01-05 at 22:05 +0100, Joachim Zobel wrote:
> Hi.
>
> Are there any compiled (preferrably functional) languages that be used
> to write apache modules? Such a language should be sufficiently
> efficient and it should not require a mod_<language>.
>
> Any hints are appreciated.
What platform?
You basically need something that can produce:
1) a dynamically shared object (i don't think you want to even think
of statically linking ...)
2) supports C calling convention
3) can handle callbacks from the C world.
4) can generate the necessary module structure as part of
the exported interface.
Out of my head (read: without doing much research):
Lisp:
The only "free" (Common) Lisp that i think of that can create is ECL
(maybe GCL as well, but i doubt). Both LispWorks and Allegro should be
able to create SO/ddls but i never tested that.
OCaml:
the OCaml _native_ compiler can't create shared objects/dlls (don't even
ask on the mailing list!). There's a module that deals with OCaml
bytecode but you said you don't want extra modules ...
Haskell:
No SO/dlls out of the box. There's some support for dll creation on MS
Windows, but who wants to run a production system on Windows? :-)
(look at the GHC-6 manpage, option '--mk-dll').
Scheme:
Bigloo _should_ be able to generate shared objects but you'd probably
need to write quite some glue code (same is true for ECL as well).
HTH Ralf Mattes
----- End forwarded message -----