From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: weis Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id OAA03452 for caml-redistribution@pauillac.inria.fr; Thu, 24 Feb 2000 14:51:04 +0100 (MET) Resent-Message-Id: <200002241351.OAA03452@pauillac.inria.fr> 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 UAA04877 for ; Wed, 23 Feb 2000 20:39:36 +0100 (MET) Received: from tobago.inria.fr (tobago.inria.fr [128.93.8.21]) by concorde.inria.fr (8.8.7/8.8.7) with ESMTP id UAA23711 for ; Wed, 23 Feb 2000 20:39:36 +0100 (MET) Received: (from doligez@localhost) by tobago.inria.fr (8.6.10/8.6.6) id UAA01100 for caml-list@inria.fr; Wed, 23 Feb 2000 20:39:34 +0100 Date: Wed, 23 Feb 2000 20:39:34 +0100 From: Damien Doligez Message-Id: <200002231939.UAA01100@tobago.inria.fr> To: caml-list@inria.fr Subject: Re: Calling C from OCaml, GC problems Resent-From: weis@pauillac.inria.fr Resent-Date: Thu, 24 Feb 2000 14:51:04 +0100 Resent-To: caml-redistribution@pauillac.inria.fr >From: Max Skaller > >I'd recommend getting rid of those macros. Anyone writing >a CAML/C interface needs to understand details of how the GC >works so as to optimise code to exactly the required >functions to create temporary roots, etc .. it would be better >to provide the raw functions and a good explanation. Even with the raw functions and a perfect understanding of the system, I found it extremely difficult to write bug-free code, and very time-consuming to fish out the inevitable bugs. That's why the macros exist. For most people, it is more economical to write slightly less efficient code if that means less debugging time and fewer bugs in the released version. >I do wonder if it would not be useful to have a function(s) >that did allocations without collecting. If only we knew how to do that, we could get rid of the GC altogether. (tongue in cheek) -- Damien