caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Miles Egan <miles@caddr.com>
To: David Monniaux <monniaux@dmi.ens.fr>
Cc: "'Liste CAML'" <caml-list@inria.fr>
Subject: Re: mixing different languages (was: RE: [Caml-list] dynamic HTML pages)
Date: 09 Apr 2003 11:12:45 -0700	[thread overview]
Message-ID: <1049911965.27729.17.camel@pompous.pixar.com> (raw)
In-Reply-To: <Pine.GSO.4.03.10304081419350.18287-100000@basilic.ens.fr>

[-- Attachment #1: Type: text/plain, Size: 2011 bytes --]

On Tue, 2003-04-08 at 05:28, David Monniaux wrote:
> On Tue, 8 Apr 2003, Mattias Waldau wrote:
> 
> > I use HereDoc by Alain Frisch. I think I use an old version. 
> > It works like JSP. Very simple to use. Based on camlp4.
> 
> This is slightly off-topic, but:
> 
> In the case of dynamic WWW pages, it is often the case that the same
> script or program actually contains code written in several languages:
> HTML, SQL, OCaml/PHP/Perl, XML...

I've used half a dozen different web frameworks in the last several
years and the one thing they all seem to have in common is some kind of
highly dynamic template/expression language.

Most recently I've been using Jakarta Tapestry, which uses ognl
(http://www.ognl.org), a library that evaluates dynamic expressions on
java objects and relies heavily on reflection.  In fact, many of the
more interesting Java projects I've seen recently make heavy use of
reflection or even direct bytecode manipulation to free themselves of
the strictures of the type system and achieve various kinds of
metaprogramming.

It's hard to imagine doing some of the same things in a language like
OCaml, where runtime metaprogramming is difficult if not impossible. 
How would one implement something like a general-purpose
object-relational mapper, for instance, in OCaml.  Is this just a
fundmental engineering tradeoff of highly typed languages?  Do you have
to sacrifice metaprogramming and runtime introspection for type
inference and type safety?

It seems somewhat ironic to me that large projects in strictly typed
languages often end up building in some kind of meta-object layer and
that all the highly dynamic languages (lisp, python, etc) work hard to
do fancy type inference under the hood?  Perhaps it's just a fact of
life that many complex software systems need to find some common middle
ground with a combination strict type checking and powerful
metaprogramming / introspection features?

-- 
Miles Egan <miles@caddr.com>

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

  parent reply	other threads:[~2003-04-09 18:12 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-04-08  7:27 [Caml-list] dynamic HTML pages David Monniaux
2003-04-08  9:19 ` Maxence Guesdon
2003-04-08 11:59 ` Mattias Waldau
2003-04-08 12:28   ` mixing different languages (was: RE: [Caml-list] dynamic HTML pages) David Monniaux
2003-04-09 17:03     ` Fred Yankowski
2003-04-09 17:24       ` Brian Skahan
2003-04-10  7:20         ` Christian Lindig
2003-04-13 14:01       ` Pierre Weis
2003-04-09 18:12     ` Miles Egan [this message]
2003-04-09 23:00       ` Jeff Henrikson
2003-04-10  0:19         ` Miles Egan

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=1049911965.27729.17.camel@pompous.pixar.com \
    --to=miles@caddr.com \
    --cc=caml-list@inria.fr \
    --cc=monniaux@dmi.ens.fr \
    /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).