firstname.lastname@example.org (Olin Shivers) writes:
| The big, big problem with Cig (actually with any Scheme 48 C interface) is
| returning aggregate data structures, such as strings, arrays, or structs.
| The problem is that there is no provision in S48 for allocating on the Scheme
| heap from C code. So you have to do all allocation on the Scheme side. You
| can always pass data structures into C, which is allowed to mutate them,
| but it can't allocate new ones. Playing by these rules gets complicated
| when you want your C function to return a vector whose size is not known
| ahead of time. For example, scsh has a function that returns all the files
| in a directory as a vector of strings. It's a pain to do this in scsh.
Is this because Scheme-48 needs to keep track of pointers for garbage
collection? Would this be solved by a conservative collector or is there
some other interesting reason?
Dr. Eric Jeschke | Visiting Research Associate
email@example.com | Indiana University
| Computer Science Department