lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Thu, Jul 25, 2013 at 11:31 AM, Leo Romanoff <romixlev@yahoo.com> wrote:
> Exactly! It doesn't work in Lua anymore, which is to be avoided whenever possible.

And this is where we disagree. Why should it be avoided?

The languages have already diverged. LuaJIT and Lua 5.2 have both
added features that weren't in their common ancestor, Lua 5.1. It's
certainly possible (in fact, not even difficult) to write code that
supports all three targets; most Lua 5.1 code will run unmodified on
both LuaJIT and Lua 5.2.

However, if you're to the point where you're looking for ways to go
past the implementation details of the VM for performance reasons,
you've already given up on compatibility. Supposing the code were to
FUNCTION on Lua 5.2 (for example, if you're not using setfenv and you
don't depend on nil/NULL equivalence and you're okay with loading
LuaFFI), the performance characteristics would differ.

There's nothing here that says that incompatibility is avoided
whenever possible. Keeping the language CORE compatible is valuable,
but there's nothing practical about taking a dogmatic approach to
avoiding extensions.

/s/ Adam