[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: embedding vs extending
- From: "Eric Tetz" <erictetz@...>
- Date: Thu, 6 Nov 2008 14:04:57 -0800
> When is it appropriate to embed Lua, instead of extending it?
You pretty much always do both. You can think of Lua has a scripting language library, and lua.exe as a reference host application which embeds it.
> The way I see it, it makes more sense for the higher-level language Lua to be
> the 'host' language from which you make calls to foreign libs, than to have
> the lower-level language (C) be the 'host' and embedding Lua.
Imagine you're the author of a big application like, say, Photoshop, and you want to expose some a macro functionality. You embed Lua (so you can run Lua scripts) then extend it (so those scripts have access to selected parts of your app's internals).