Version française
Home     About     Download     Resources     Contact us    
Browse thread
Interfacing with C question...
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Robert Roessler <roessler@r...>
Subject: Re: [Caml-list] Interfacing with C question...
skaller wrote:
> ...
> It takes a bit of reading, thinking, and question asking
> to figure the gc out, but it is worth it: it really isn't that
> hard and IMHO the higher level macros just confuse things
> by obscuring the real constraints.
> 
> [Once you know how it works .. *then* you can use the
> higher level macros because you then know what they're
> sugar for .. :]

While understanding what is going on under the covers *is* important, 
there is a key reason for using the macros: as the documented and 
recommended interface to the OCaml GC machinery, their use gives you a 
much better chance that your code will easily / automagically survive 
changes to the GC mechanism in the future... like if direct support of 
multi- cores and processors ever becomes a reality. ;)

Robert Roessler
roessler@rftp.com
http://www.rftp.com