lua-users home
lua-l archive

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


On Mon, Feb 1, 2010 at 10:35, pan shizhu <pan.shizhu@gmail.com> wrote:
>> Unless I'm missing something you can *not* statically link Lua to your
>> application if you want to use any dynamically linked C modules.

> This is not true, at least not true for Unix.

Right, sorry.

>> You'd get not Lua, but your own dialect of a language.

> Then what is Lua?

> IMO Lua is a template to let you define a script language for your application.

> And in reality, it is, you cannot use lua code written for one game in
> another different game.

But why not?  I do. It depends on how you build your architecture.

> Lua is a language engine.

No. Lua is a flexible language.

One (perfectly good) way to use Lua is to embed it into your engine.
You extend your engine with Lua where you see fit.

Another, equally good way is to write Lua-centric code and extend it
with modules, dedicated for solving your concrete problems. This way
allows you to reuse existing third party code.

Actually, even when I'm embedding Lua into engine, I'm trying to
bootstrap it as lightly as possible, and then try to write in the
second way. I find this approach cleaner. (This is only my personal
preference, of course.)

Alexander.