luajit-ffi

Alex Rønne Petersen xtzgzorex at gmail.com
Tue May 1 08:32:39 PDT 2012


On 01-05-2012 17:24, so wrote:
> http://luajit.org/ext_ffi.html
> https://github.com/malkia/ufo
>
> How awesome is Mike Pall?
> I didn't dive into details of the code, but if he can do this with a
> dynamic language, why on earth D still need manual C bindings while
> having ABI compatibility? So luajit comes with a C compiler?

Parsing a C header is relatively easy; don't need a full compiler for 
that. It's what htod does. I don't know what you mean by "manual 
bindings", but keep in mind that:

1) We *don't* want to embed some kind of crazy C syntax in D.
2) In D, we want statically bound C function calls. Lua is a dynamic 
language.
3) LuaJIT will have the same problems as htod: Preprocessor definitions.

-- 
- Alex


More information about the Digitalmars-d mailing list