by InitEnabler on 3/18/24, 3:54 PM with 15 comments
by uticus on 3/18/24, 9:32 PM
> Lua is perfect as a small embeddable dynamic language so why a derivative? Ravi extends Lua with static typing for improved performance when JIT compilation is enabled.
> There are other attempts to add static typing to Lua - e.g. Typed Lua but these efforts are mostly about adding static type checks in the language while leaving the VM unmodified.
> Of course there is the fantastic LuaJIT implementation. Ravi has a different goal compared to LuaJIT. Ravi prioritizes ease of maintenance and support, language safety, and compatibility with Lua 5.3, over maximum performance.
by vitiral on 3/19/24, 3:32 AM
Lua only has 5 "data" types: nil, bool, number, string, and table. There is also "userdata" (defined in C)
Would this improve performance for functions that take in the non-table types? Or does it provide some mechanism for structured data besides tables?
I have a hard time believing there are many performance gains to be had for the few functions that take in only native types. I suppose compiling those could have major performance improvements in a few tight-loop use-cases?
by synergy20 on 3/18/24, 9:00 PM
for typed lua, there is a newer typescript-alike effort https://github.com/teal-language/tl than the mentioned one at https://github.com/andremm/typedlua
by ArkimPhiri on 3/18/24, 9:29 PM
by logtempo on 3/19/24, 12:09 AM