Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] dynamic HTML pages
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Miles Egan <miles@c...>
Subject: Re: mixing different languages (was: RE: [Caml-list] dynamic HTML pages)
Take object-relational mapping as an example.  Let's say I want to write
an o-r mapping layer that can persist arbitrary classes without having
access to their source code.

On Wed, 2003-04-09 at 16:00, Jeff Henrikson wrote:
> I'm not sure I understand what you want, but wouldn't just having a 
> program spew stuff back into its own toplevel be a sledgehammer for 
> dynamic metaprogramming?  I'm surprised I haven't seen more code that 
> does this.  That combined with being able to do things like recurse 
> over your own source code (esp. data types) with camlp4 seems way 
> better than could be done by hand mucking java byte codes.  But again, 
> I'm not sure what you want.
> 
> 
> Jeff Henrikson
> 
> 
> . . .
> > 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>
> > <signature.asc>
-- 
Miles Egan <miles@caddr.com>