lua-users home
lua-l archive

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


On 12/19/07, Chris Cranford <crancran@gmail.com> wrote:
> Is it better to use the lua API inside C/C++ or would it be easier for
> me to write a simple LUA script that I load and execute from the C/C++
> framework and the LUA script itself loads the table file and parses
> it?

not exactly about your problem; but in general it's far easier to do
most in Lua.

my own history: i had a project that i knew would benefit from
scripting some functions to make it extensible.  after a while, i
found that my C code was only low level hooks into the data storage,
with ALL the flow managed in Lua.

nowadays, i don't even bother writing 'executables', it's all Lua.
when i need some to access something with only C API, i write very
thin modules to make the needed functionality accessible from Lua.

in fact, that's why i wrote the Lua-TCC module: to make it easier to
prototype C code with Lua firmly in control


-- 
Javier