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
[Caml-list] lisp to ocaml
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2005-09-18 (02:59)
From: Jon Harrop <jon@f...>
Subject: Re: [Caml-list] lisp to ocaml
On Sunday 18 September 2005 02:08, Jonathan Roewen wrote:
> Does anyone know of a tool that can convert lisp to ocaml (or
> something other ML dialect)? I've tried googling and couldn't find
> anything. Just all the parentheses gets a bit confusing for a first
> look at lisp ;-)

You could do a "straightforward" conversion by starting with a simple Lisp 
interpreter written in OCaml and partially specialising it over the Lisp 

However, if you find Lisp's brackets confusing then you're likely to find the 
enormous amount of boxing, unboxing and dynamic type checking that would 
result even more confusing. You could probably get rid of much of that but it 
would greatly complicate the translator.

Interestingly, I just proposed writing a staged Scheme interpreter to Walid 
Taha, as a possible MetaOCaml example. If one existed then you could just 
look at the OCaml code that it generated.

Dr Jon D Harrop, Flying Frog Consultancy Ltd.
Objective CAML for Scientists