From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id UAA27207; Wed, 9 Apr 2003 20:12:49 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id UAA27265 for ; Wed, 9 Apr 2003 20:12:47 +0200 (MET DST) Received: from manly.caddr.com ([192.153.219.146]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id h39ICk910698 for ; Wed, 9 Apr 2003 20:12:46 +0200 (MET DST) Received: from pompous.pixar.com (pompous.pixar.com [138.72.15.78]) by manly.caddr.com (Postfix) with ESMTP id B3F1C20A0A; Wed, 9 Apr 2003 11:13:04 -0700 (PDT) Subject: Re: mixing different languages (was: RE: [Caml-list] dynamic HTML pages) From: Miles Egan To: David Monniaux Cc: "'Liste CAML'" In-Reply-To: References: Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-7oyjkYexMK92VybtO5bH" Message-Id: <1049911965.27729.17.camel@pompous.pixar.com> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.4- Date: 09 Apr 2003 11:12:45 -0700 X-Spam: no; 0.00; egan:01 caml-list:01 monniaux:01 mattias:01 waldau:01 heredoc:01 alain:01 frisch:01 camlp:01 frameworks:01 jakarta:01 reflection:01 runtime:01 tradeoff:01 inference:01 X-Attachments: type="application/pgp-signature" name="signature.asc" Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk --=-7oyjkYexMK92VybtO5bH Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Tue, 2003-04-08 at 05:28, David Monniaux wrote: > On Tue, 8 Apr 2003, Mattias Waldau wrote: >=20 > > I use HereDoc by Alain Frisch. I think I use an old version.=20 > > It works like JSP. Very simple to use. Based on camlp4. >=20 > This is slightly off-topic, but: >=20 > 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.=20 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? --=20 Miles Egan --=-7oyjkYexMK92VybtO5bH Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQA+lGKdU4Jq/wH1PVERAh11AJ9Pnih9IR3ao4lJkCuOMVu8TIavbACgw9aU AMqP1MKAURi2cVM+Wkp8Z08= =Zhf0 -----END PGP SIGNATURE----- --=-7oyjkYexMK92VybtO5bH-- ------------------- 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