Date: Sun, 7 Dec 1997 14:41:39 +0100
From: Damien Doligez <Damien.Doligez@inria.fr>
Message-Id: <199712071341.OAA10810@tobago.inria.fr>
To: caml-list@inria.fr
Subject: Re: mixed customizable external data types in Caml
>From: Basile STARYNKEVITCH <Basile.Starynkevitch@cea.fr>
>
>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
>types.
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