[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: 3 small questions
- From: "Wim Couwenberg" <w.couwenberg@...>
- Date: Thu, 10 Apr 2003 10:40:46 +0200
Hi James,
> 1) Does everybody using C++ usually write their own Lua API wrapper (as
> I am currently using) or is there a common way for C++ developers to do
> this (like toLua seems to be _the_ tool for it's job).
We design and implement each Lua - C/C++ interface manually, and for a
reason. Following the discussions on this list I get the impression that we
might be a minority in this respect. However, for us it has worked just
great.
The various interfaces we've implemented thusfar (including UI bindings, XML
handling and (proprietary) DB access) are all rearranged significantly
compared to their C/C++ counterparts. These changes greatly enhance the
usability of each respective lib in a scripting environment. I doubt that
any auto generation tool could do the same, but I have to admit that we
never seriously tried one (and still don't feel the need.)
Design and implementation of most interfaces didn't take very long. I'd say
a single day tops (including testing.) The UI one is a bit of an exception
because we expand it on a need-to basis (and the C API is of course rather
large as well :-)
Finally, doing the interfaces by hand is a great way to get familiar with
both the C and scripting sides of Lua. I highly recommend it!
Bye,
Wim