lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


 
> Making new objects requires not only their
> constructors but the whole machinery of 'new' itself.   I've done this
> kind of thing (although not in this context) and things get 
> pretty hairy.  It's a pity in a way that the cool 
> cross-platform kits are
> C++, because C++ does not play nice with the rest of the world.

I've done this for my Qt bindings using standard Lua C API and placement new
(where needed), and it works pretty smoothly, although I agree about the
things getting quite complex. That's why I'm so excited about possibilities
of the FFI, because it moves most of the "mechanically generated" binding
stuff (basically method and property calls) to Lua, leaving the "tricky"
binding functionality more compact and overseeable.