[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: When to use Lua
- From: Eric Scouten <scouten@...>
- Date: Tue, 26 Sep 2006 13:32:11 -0700
On 26 Sep 2006, at 13:18, Jason T. Slack wrote:
I stumbled upon Lua when reading about Adobe Lightroom.
I write a text editor and backup software, under what circumstances
would I want to use Lua in my applications? What does it do for me?
Lightroom is a classic example of a hybrid application. We are able
to exploit the strengths of several languages. There are portions of
the app that we would never write in Lua (our core image processing
routines, for example), and other portions where the use of Lua saves
us a tremendous amount of time in the development process.
In large part, our application consists of a fairly rich native code
layer which exposes various platform services (OS, file system, user
interface fundamentals) and Adobe native code libraries (camera raw
processing, etc.) to Lua. Most of the core "business logic" of
Lightroom is expressed in Lua. Among other things, this allows us to
gloss over the fact that the native code may be radically different
(i.e. most of our Windows UI layer is written in C++, but the Mac UI
layer is written in Objective C, yet the layout is described only
once ... in Lua).
Having used Lua for a few years now, I've been amazed at how quickly
I can build up arbitrary data structures and defer processing ("do
this task whenever the app is idle but only once", etc.). It makes us
all much more nimble as a development team.