Jin S. Choi wrote:
> >From what little I've seen, it appears that ALL Scheme FFIs are very
> tightly linked to their own implementation strategy. A lot of the
> problem comes from having to deal with GC of user defined types.
It seems, then, that the first question to ask and answer would be,
"What user-defined types?" I assume you mean the ability to add
distinct variants at "compile"- or "run"-time; not all Scheme's
support such a facility. I believe Scheme48's record system does,
while Chez Scheme's `define-structure' doesn't. (Rice Scheme, which
sits atop Chez Scheme, makes the new structures be distinct entities,
but this information isn't preserved across foreign procedures.)
We would first have to agree on how to define such extensions. We'd
also have to figure out just how generative these declarations are;
for certain reasonable semantics, efficient implementation strategy
becomes an issue (especially if you don't have access to the innards
of the compiler in question).
It seems that until that is resolved, the FFI issue can't quite be.
'shriram
|