[Nickle] Currency conversion (foreign function interface)
keithp at keithp.com
Mon Dec 6 10:11:56 PST 2004
Around 7 o'clock on Dec 6, Bart Massey wrote:
> Huh. I thought the FFI plan was to be able to do some
> extern "C" equivalent...
Yeah, would be nice, but that's a large stack of work, and I don't know
exactly how it would work. It's the structured datatypes which seem
hardest to unravel.
Plus, I'm not sure it's really all that much easier to write these by hand
in nickle than in C. Something which did this automatically from a header
file, perhaps with a bit of prompting from the user would be even nicer.
> Only problem is that now you have to make some chunk of the Nickle
> compiler understand handling C-style arguments. Some of the machinery is
> already there from the builtin stuff
The builtin stuff demands that the C code itself perform the nickle->C
representation conversions. There isn't any automated mechanism here.
Right now, I'm interested in getting the machinery for actually calling
the functions with the right datatypes working, I think that's a big
enough piece that working on that and ignoring the stub generation until
later makes some sense.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 228 bytes
Desc: not available
Url : /pipermail/nickle/attachments/20041206/4e44e3ba/attachment.pgp
More information about the Nickle