This page is part of the web mail archives of SRFI 50 from before July 7th, 2015. The new archives for SRFI 50 contain all messages, not just those from before July 7th, 2015.
"Felix" == Felix Winkelmann <felix@xxxxxxxxxxxxx> writes:Felix> You normally don't cons that much in wrapped code: C doesn't know Felix> about Scheme data. It cares about C data. If that holds, then the current draft doesn't require you to do any GC annotations on that code, and most of the problems go away.
Wrong, because the current draft passes around unconverted, live Scheme data merrily, without worrying about the consequences. Instead give C data to the C code. It's really not that hard to understand. Look how the Gambit FFI does it, for example.
For C code where it doesn't hold, both the current draft and what you seemto be suggesting cause problems.
Not at all. What problems do you mean? The amount of C code for which this holds is small and some refactoring (reducing the consing to a few distinct callbacks) does the trick in most cases. I can only judge from experience, I can't prove it, of course.
Sure I don't cons much in wrapped code---but I cons often in the code which does the wrapping, which comes down to the same thing.
You don't have to do that. Let Scheme or implementation-specific glue code do that. cheers, felix