caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Max Skaller <maxs@in.ot.com.au>
To: Damien Doligez <Damien.Doligez@inria.fr>
Cc: caml-list@inria.fr
Subject: Re: Calling C from OCaml, GC problems
Date: Fri, 25 Feb 2000 10:36:37 +1100	[thread overview]
Message-ID: <38B5C085.A1F9898F@in.ot.com.au> (raw)
In-Reply-To: <200002231939.UAA01100@tobago.inria.fr>

Damien Doligez wrote:
> 
> >From: Max Skaller <maxs@in.ot.com.au>
> >
> >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.  

	But, use of the macros _also_ leads to code with bugs,
as we are hearing, but programmers now have extra information to
cope with, and no good explanation of exactly what the
GC routines DO.

	Generally I agree with your (elided) comments about
correctness and efficiency, but for some kinds of interfacing,
the best possible performance is required. Anyone doing C interfacing
needs to have considerable expertise -- I think it would be best
to addess primary documentation to such people.


-- 
John (Max) Skaller at OTT [Open Telecommications Ltd]
mailto:maxs@in.ot.com.au      -- at work
mailto:skaller@maxtal.com.au  -- at home



  reply	other threads:[~2000-02-25 13:03 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-02-23 19:39 Damien Doligez
2000-02-24 23:36 ` Max Skaller [this message]
  -- strict thread matches above, loose matches on Subject: below --
2000-02-16 15:41 David Mentré
2000-02-18  1:26 ` Markus Mottl
2000-02-18  9:45 ` Xavier Leroy
2000-02-21 16:54   ` David Mentré
2000-02-21 23:41     ` Max Skaller
2000-02-18 10:48 ` Juan J. Quintela
2000-02-21 13:40   ` David Mentré

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=38B5C085.A1F9898F@in.ot.com.au \
    --to=maxs@in.ot.com.au \
    --cc=Damien.Doligez@inria.fr \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).