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
adding a scripting language to an ocaml program
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2010-07-06 (10:38)
From: Richard Jones <rich@a...>
Subject: Re: [Caml-list] adding a scripting language to an ocaml program
On Sun, Jul 04, 2010 at 12:04:32AM +0530, Martin DeMello wrote:
> Has much work been done on adding a scripting language to an OCaml
> program? I googled about a bit, but no one seems to be even talking
> about this - for example, if I wanted to do something emacslike with a
> core in OCaml and (ideally) some sort of scheme as a scripting engine
> in place of elisp, would that be easily doable?

You can embed a Perl interpreter and call out to Perl code using
perl4caml's Perl.eval function.  The API is even "type safe" in as
much as you can construct and examine the values going between the
Perl and the OCaml code, and detect errors at runtime (at compile time
too in some circumstances).


Your users might not thank you for this ...


Richard Jones
Red Hat