Browse thread
Re: mixed customizable external data types in Caml
- Damien Doligez
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Damien Doligez <Damien.Doligez@i...> |
| 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