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
This archive was generated by hypermail 2b29 : Fri Feb 25 2000 - 14:07:07 MET