3 ms·
The advantage that Lua has is that it has about the simplest possible binding interface you can imagine for a Language. There's no manifests, no class definiti
by stravant 5y ago
The advantage that Lua has is that it has about the simplest possible binding interface you can imagine for a Language.
There's no manifests, no class definitions, no anything really. It's as simple as calling lua_newstate to create a state, calling lua_pushcfunction to register some functions that expose your desired engine functionality, and calling lua_loadstring with a script to run.
That means you can use Lua in your engine for something as simple as a CLI interface that just exposes a couple dozen functions, and it's still worth it. Where with any other scripting language you'd have to be doing a lot more with it to make the setup cost worthwhile.
Having LuaJIT available if you end up wanting to do more with it later is the icing on the cake.