← Back to context

Comment by Rohansi

17 hours ago

> It’s nice that Lua is simple, the syntax changes should hopefully make Lua code even simpler to read too

But which Lua?

Lua as implemented by LuaJIT is a fork of the language at this point. It's not fully compatible with PUC Lua (the reference implementation) and LuaJIT does not support features from the latest Lua version.

> Lua as implemented by LuaJIT is a fork of the language at this point.

Lua is strange. Lua 5.2 was more of a "fork of the language" than LuaJIT, at the time. 5.3 and 5.4 (especially the latter) changed even more. Lua looks like a family of languages, and it seems to be by design. It probably makes sense in the "embedded scripting" space. Lua is not really meant to be (though it obviously is, if you want) a general-purpose language. It's meant for extending other apps, and scripting engines have different requirements than other language implementations: basically, hardcore backward compatibility. But it's impossible to evolve the language and innovate in its design if you commit to that. This is still an academic project, so hardcore backward compatibility is unlikely to be something the authors would value. Hence, the mixed model - every major version is a new "take" on the language. You're expected to pick a version when you first need a scripting engine, and then sit on that version until the end of time. Meanwhile, PUC releases new versions of Lua, and new projects pick those newer versions (and then sit on them forever).

It looks strange, and it has important downsides (a fragmented ecosystem, huge PITA when trying to write portable libraries, so fewer libraries in general, etc.), but it does seem to work in that Lua still exists and, project after project (not within a single project), it continues evolving.