4 ms·
> You can cover literally the first two things with LuaJIT. Not at all. You don't have explicit control over generating machine code in LuaJIT. OTOH all Terra
by vbit 11y ago
> You can cover literally the first two things with LuaJIT.
Not at all. You don't have explicit control over generating machine code in LuaJIT. OTOH all Terra functions - whether dynamically generated or pre-written - will get compiled to machine code via LLVM. So it's explicit, i.e. more work, but more predictable. Arguably Terra code generation will cover more scenarios - consider some code paths may not be JITable at all by LuaJIT (due to NYI) but if you can generate a Terra function, you're guaranteed machine code.
> If you're using Lua to not use Lua, you never wanted to use Lua to begin with!
You're using Lua as a meta-programming language for Terra. If you know Lua, it could be a lot more convenient than using custom or archaic meta-programming languages.