[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: LuaJIT FFI vs Lua binding vs Lua interface
- From: Miles Bader <miles@...>
- Date: Fri, 22 Jun 2012 07:33:07 +0900
Francesco Abbate <email@example.com> writes:
> In my point of view the FFI interface is so much interesting that it
> would be a benefit for Lua, as a programming language, to adopt it as
> a standard library.
The FFI interface is not a good fit for ordinary Lua, because it's too
dynamic (too much stuff happens at runtime), and as a result, too slow.
In LuaJIT, this isn't an issue because LuaJIT can compile everything at
runtime, but Lua can't do that.
> A pure Lua FFI implementation already exists
"LuaFFI" is not pure Lua, and is not portable (it has CPU-dependent
parts). That makes it a poor choice (in addition to the problems I
mentioned above) for anybody desiring the good portability of Lua.
The secret to creativity is knowing how to hide your sources.