From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id QAA03445 for caml-redistribution; Sun, 7 Dec 1997 16:46:10 +0100 (MET) Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id OAA01947 for ; Sun, 7 Dec 1997 14:41:42 +0100 (MET) Received: from tobago.inria.fr (tobago.inria.fr [128.93.8.21]) by concorde.inria.fr (8.8.7/8.8.5) with ESMTP id OAA09208 for ; Sun, 7 Dec 1997 14:41:40 +0100 (MET) Received: (from doligez@localhost) by tobago.inria.fr (8.6.10/8.6.6) id OAA10810 for caml-list@inria.fr; Sun, 7 Dec 1997 14:41:39 +0100 Date: Sun, 7 Dec 1997 14:41:39 +0100 From: Damien Doligez Message-Id: <199712071341.OAA10810@tobago.inria.fr> To: caml-list@inria.fr Subject: Re: mixed customizable external data types in Caml Sender: weis >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 >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