Re: mixed customizable external data types in Caml

From: Damien Doligez (
Date: Sun Dec 07 1997 - 14:41:39 MET

Date: Sun, 7 Dec 1997 14:41:39 +0100
From: Damien Doligez <>
Message-Id: <>
Subject: Re: mixed customizable external data types in Caml

>From: Basile STARYNKEVITCH <>
>When using caml as an embedding langage (concretly, caml used as a
>scripting langage to existing numerical applications coded in Fortran
>or C) it would be very nice to be able to have a Caml value containing
>both Caml values (ie pointers or tagged integers) and other stuff,
>such (as a Fortran matrix or whatever).
>Of course it is already possible to use an arbitrary pointer to
>whatever C or Fortran data.
>But it would be nice to be able to have all of Caml memory management
>stuff (in particular garbage collection and marshalling) in mixed data

You can have garbage collection easily: put your foreign data in one
object, and your caml values in another object, along with a pointer
to the first object.

I'd say the real interest would be in marshalling, equality, and
ordering. And I see a big problem with unmarshaling. How does the
system find the unmarshaling function ? There is no pointer to the
descriptor in the object, because the object does not exist yet.

-- Damien

This archive was generated by hypermail 2b29 : Sun Jan 02 2000 - 11:58:13 MET