4 ms·
Ideally a new Lua dialect would be capable of compiling to both Lua and LuaJIT. The language is effectively forked, with the fastest implementation (LuaJIT) an
by haberman 3y ago
Ideally a new Lua dialect would be capable of compiling to both Lua and LuaJIT. The language is effectively forked, with the fastest implementation (LuaJIT) and the official implementation (Lua) living in seemingly irreconcilable worlds.
- giraffe_lady 3y agoEh it's not just luajit and luajit didn't create that problem either. It's a symptom of lua actually succeeding at its design goal of being easily embedded as an extension language. A handful of incompatible runtimes are more popular than the most recent puc lua, including I believe the older official lua 5.2 released in 2011. I've done a fair bit of professional lua development and I don't think I've ever written standalone up-to-date puc lua except maybe for some tooling & scripts. It's such a small language and used in such a way that the runtime, distribution method, and available APIs have much more impact on your use (and compatibility) than the version. Virtually everyone shipping a lua environment is also shipping changes to it that make it a unique target, if only extensions to the standard library. This is why I think syntax layer-only approach like fennel's is the correct choice for improving on lua. It mirrors lua's runtime semantics exactly, and allows you to access the implementation peculiars on their own terms and so can just be run on top of any lua system. https://fennel-lang.org https://fennel-lang.org