lua-users home
lua-l archive

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


Thanks for the feedbacks !

I really enjoy working on this project, but I'm a bit busied at the
moment so it goes a bit slowly
In one of the latest updates, you can write entire arrays at once by calling:
writeVariable("myArray", Lua::LuaContext::Array( key1, value1, key2,
value2, ... ));


2010/7/22 Jose <jmalv04@gmail.com>:
> I think it would help to have to have an example where your library is
> being used as a wrapper for a real C++ library and to better
> understand what the library is missing.

I had the idea too, and I'll work on it when I have some time.

It may not seem obvious when looking at the examples, but the idea is
to call "registerFunction" once for each function of each of your
class, right after you created the LuaContext.



2010/7/22 Binh Nguyen <ngbinh@gmail.com>:
> I really like the interface. Have you tried to compare its performance cost
> with other bindings?
>
> Thanks
>

I didn't do any performance test for the moment, but I'm trying to
make an implementation which is as fast as possible

Most of the features are implemented using templates (as you can see
if you browse the code), so there should be few performance penalty

There is one major exception: type-safety when you read a "custom
object" (ie. an instance of one of your class)
When I write a "custom object" I store its typeid in the variable's
metatable, and check if it is correct when reading the variable.
I don't know if I will keep this feature, remove it, or only
enable/disable it when you define a macro

Other small exceptions include:
 -  the possibility to read/write directly inside an array using most
of the functions of the library, which involves checking if a dot is
present in the name of the variable.
 - writing a lambda functions to a variable creates a userdata whose
metatable contains a "__call" function, instead of directly a
cfunction (so the lamda is destroyed by the garbage collector)