2. switch Lua to C++ for Linux and other OS, too
As approach 1. means a lot of work and would force a rewrite of all
tolua based code I would prefer the second solution.
Is anyone aware of other solutions? Does anyone object solution 2?
I think this would be a reasonable solution for the moment, although I'm
not sure that this is safe from Lua's perspective. For example, I'm not
sure that this couldn't lead to memory leaks in the Lua interpreter, or
leave the Lua interpreter in some inconstistent state.
It doesn't solve another problem: Lua scripts still don't have a chance
to handle errors raised in the Enigma engine. A better (long-term)
solution might therefore be to map C++ exceptions to "lua_error" or
luaL_error calls. I don't think that this is an urgent issue at the
moment, and I'm not sure that tolua would support this, but it's
certainly something to think about.