Version française
Home     About     Download     Resources     Contact us    
Browse thread
ML extension language
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Stefan Monnier <monnier+/news@T...>
Subject: Re: ML extension language
Lyn A Headley <laheadle@midway.uchicago.edu> writes:
> Do people see this as worthwhile project, and one that is fairly
> different from existing facilities?  It is interesting that *all*
> existing extension languages are weakly typed, and it would be neat to
> see what a polymorphically typed one could offer.  Thus far, I plan
> to use almost the entire caml-light runtime system, and write a different
> compiler (in C) for a simpler, but (hopefully!) still powerful language.  

I recently considered adding an extension language to the ctwm window-manager
in order to replace its clunky and limited .ctwmrc configuration facility. I
gave up because the only convincing (implementation) language available was
O'Caml, but it would have required to start by rewriting the event loop in
O'Caml so as to have O'Caml call C rather than the opposite.

I'd love to see an "embedded O'Caml". Rather than write a new language, it
seems that it would be easier/better to hack O'Caml directly so as to keep the
whole language and even hopefully get the changes folded in the official
distribution. From the little I know of the working of the run-time system, it
looks like the main problem with calling O'Caml from C has to do with GC, but
it seems doable. The easiest path might be to have "main" call O'Caml (just as
it already is) and then have O'Caml's main function do just the basic
initialization and then immedialtely call the main C function (so that the C
code actually runs within O'Caml).


        Stefan