Modified proposal for default decls
fjh at cs.mu.oz.au
Mon Feb 26 14:05:45 EST 2001
On 26-Feb-2001, Alastair Reid <reid at cs.utah.edu> wrote:
> > Many C interfaces contain a significant number of macros. And C is
> > one of the most widely used languages that we want to interface with.
> > So it seems to me that any FFI which aims to provide *good* support for
> > C ought to provide a way of accessing C macros.
> Since an explicit goal of the original ffi design was that it would not require
> a C compiler to implement it and since at least one implementation (STG-Hugs)
> doesn't require a C compiler, I'd like to see a lot of discussion before we add
> support for macros to the ffi.
Given the current state of affairs, I think it would be reasonable to
only require implementations to support interfacing with C functions,
and to not require implementations to support interfacing directly
with C macros, variables, enumeration constants, etc.
After all, you can only standardize on the lowest common denominator.
But I think it would be very nice to standardize on a syntax for doing
that, even if supporting that syntax is optional rather than a requirement.
I think that in the long run most implementations will want to support it.
I also think that it would be nice to standardize on the syntax used
to tell the compiler which include files are needed.
Fergus Henderson <fjh at cs.mu.oz.au> | "I have always known that the pursuit
| of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh> | -- the last words of T. S. Garp.
More information about the FFI