I'm on my second project now where I'm writing most of the game in Lua and some functions in C. Both times, given my prior experience writing Lua bindings, I've been annoyed at the lack of lua_newtable
and lua_settable
.
I can see what you're going for, trying to make Lua appear more object-oriented. For many use cases it's probably way better and easier to understand! However, sometimes I just want to return a short list of values from a function, and with the current state of the C API I'd need to make an entire class with an __index method.