Comment by TheCycoONE

Comment by TheCycoONE 14 hours ago

6 replies

Lua 5.1 to 5.2 was a fairly significant breaking change; one that has forked the community to this day with luaJIT never coming on board. 5.2 to 5.3 also broke things with the introduction of integers but mostly at the level of bindings. There is also very little included in terms of standard library and while luarocks exists many significant packages go abandoned. There are breaking language changes in the upcoming 5.5 as well though they are relatively minor.[1]

All to say I think if long term compatibility is the primary goal there are probably better languages.

Have you already discounted php or perl?

[1] https://www.lua.org/work/doc/manual.html#8

soapdog an hour ago

Be aware that Lua doesn't use semver and that versions take many years to be ready. In this page:

https://www.lua.org/versions.html

You can see that between 5.3 and 5.4 there were five years. 5.2 to 5.3 was also a five years gap.

Breaking changes are well documented and we see them years before they happen and nothing requires you to upgrade.

Most code runs on 5.1 forward.

0cf8612b2e1e 13 hours ago

Why stay on the upgrade treadmill? For such a minimal language, are the updates really that compelling?

NeoVim is committing to 5.1 and leaving it at that.

  • TheCycoONE 13 hours ago

    Sure that's an option, most distros continue to include every lua version back to at least 5.1; and since luaJIT stayed there a lot of the rest of the community did too.

    I guess I'm not sure what advantage lua has in that regard: you could stick to an old version of any language, including node, which was called out as being hard to keep up with.

    • 0cf8612b2e1e 12 hours ago

      The simple interpreter seems worth a lot. The official one is under 20k lines. There are reimplementations in many other host language (Go,Rust,JS, etc). Meaning it should be possible run Lua code forever without maintaining a full legacy virtual machine OS. I am not sure I can compile Node today, let alone N years from now as compilers and platforms shift.

shmerl 8 hours ago

Why couldn't LuaJIT support both? Feels like a needless limitation imposed on all its users. I noticed this problem when making plugins for neovim.

  • pansa2 8 hours ago

    IIRC Mike Pall (LuaJIT’s “BDFL”, and also the only person who’s ever really worked on it) dislikes some features of newer Lua versions, particularly 5.2’s _ENV.