Lua 5.1 / LuaJIT support
Apparently Lua 5.1 and LuaJIT were supported at some point, and apparently there used to be a luajit flag.
CI only seems to test Lua 5.4 and the luajit flag seems to be gone by now. I did not see any corresponding change log entries (at least nothing that is grep-able). Is LuaJIT still supported?
The relevant line in the changelog (for version 1.0.0):
Removed Features
- Support for Lua versions before 5.3 has been dropped.
I had made that decision because it proved to be too cumbersome to work around all the differences.
@tarleb thanks for your reply, that's interesting.
I'm puzzled how I would use Lua (via hslua) as an extension language and have the guarantee that extensions that I write today will still work in, say, 10 years.
Neovim guarantees that by effectively freezing the Lua version [to 5.1], but from what I understand, that's not really an option with hslua (that is, right now hslua includes 5.4, before it included 5.3, and I assume at some point in the future, it will include 5.5).
I'm not sure what to answer, as that's a very general software maintenance issue. In this specific case it's probably more of a question about the evolution of Lua than about this library.
FWIW: I still accept patches to the hslua-0.x branch, and am willing to release new 0.x version.
Just to add a small case-study: all pandoc Lua filters written 7 years ago still work, and most custom Lua writers written 14 years ago continue to work either without changes or with minimal changes.
Changes in the host program are a bigger issue than changes in Lua. At least in my experience.
The idea of somehow supporting luajit is very tempting. I'll keep it in mind for when I have some time.
The idea of somehow supporting luajit is very tempting.
I definitely agree.
Lua 5.1 / LuaJIT offers a very tempting value proposition. You get a stable language + JIT compilation on supported platforms.
I guess that's the reason why it's so popular.
What are the downsides? True, you miss out on the latest Lua features, but do you really need them? Or is stability and JIT more useful?
Also, as a side note, it kind of alienates me that a simple scripting language like Lua still "evolves" in breaking ways. I would rather have something, where the language is basically frozen.
Improvements to the interpreter/GC or the standard library are of course welcome improvements. But breaking changes to a language that is so simple, I just don't see how to justify this. I imagine that's possibly one reason why the LuaJIT author is unwilling to follow mainline.
Apparently Luau is also mostly a superset of Lua 5.1.