English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

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: 1997-03-03 (08:05)
From: Francois Rouaix <rouaix@e...>
Subject: Re: ML extension language
> A main advantage of extension languages is that they enable a high
> degree of portability, thereby facilitating the availability of (in
> this case) functional programming tools.  More specifically, instead
> of requiring the user to install an interpreter at their site to be
> able to run their application, the application *is* an interpreter for
> its own private language.

The availability of an extension language does not mean that the application
will be portable. The application itself has to be portable in the first place.
Of course, having a portable extension language allows extensions to be
portable as well.

> but the main difference is that in a caml program,
> the main program is the interpreter for the caml virtual machine, whereas
> in an extension language control resides in the application.
Even with the current releases of Caml, it may be a little more complex:
for example, in a CamlTk application, the control is essentially in the
event loop, which belongs to Tk. Moreover, using client/server, RPCs, threads
and whatever, it's "easy" to have several co-existing control flows.

> 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.  
The advantage of Caml over Scheme, Python, Tcl or Rexx is that it is 
*statically* strongly typed. The Caml runtime system knows nothing of types;
it simply provides a reasonably efficient portable platform to execute
strict functional and imperative programs.

If you want to define a language "simpler" than Caml, but that has
basically the same operational semantics as well as a strong polymorphic
static type system, it seems to me that your problem
is essentially a syntax problem (e.g. you consider some features of Caml
as superfluous for extension languages, or that you need additionnal 
constructs (such as specific application-specific control-flow)).

You might then want to have a look at Chamau/Camlp4 and related work
in extensible syntax (http://pauillac.inria.fr/~ddr/)

Francois.Rouaix@inria.fr                   Projet Cristal - INRIA Rocquencourt
WWW Home Page: http://pauillac.inria.fr/~rouaix/