[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: What makes Lua special?
- From: Frank Kastenholz <fkastenholz@...>
- Date: Fri, 21 Apr 2017 07:32:22 -0400
On 4/21/17 3:19 AM, Daurnimator wrote:
On 21 April 2017 at 17:04, Eike Decker <email@example.com> wrote:
Do you have anything else that comes to your mind?
- Size: in lines of code, complexity, #functions and actual runtime size
Compared to other languages, you can actually learn+remember the
You can read through the whole code base without getting lost
You can remember the whole standard library!
- Philosophy of "mechanism, not policy"
If there is more than one way to do something, lua will generally
and instead provide an unopinionated api on which you can build your own
- Embeddability and ease of interoperation with existing code
Lua's strong C api and enclosed runtime makes it easy to integrate
into existing applications/kernels/games.
Because of this you can use existing libraries instead of writing your own.
Not to mention that it allows you to have cross-language teams, or
phase in Lua's introduction.
I had a similar problem at work; a project we did embedded Lua in our
larger code base and got a lot of "what is Lua?" and "Why use Lua?"
kickback. As Daurnimator pointed out, Lua's size and embedability are
extremely strong assets. Another strong point for Lua is its
license. The MIT license is better for my particular
environment. Your company may find the license compelling
since it does not place the same requirements on you that the GPL
It's portability (strict adherence to C99, for example) is another
strong factor in its favor. If your environment is all Linux, or
the like, this isn't a big deal. For me, we had to run our software
in a variety of targets, not all of which run a Unix or Windows OS.
The other thing that might help you sell Lua is to get numbers
comparing its size/complexity to other languages such as Python
or Java. Besides pointing out the difference in code base sizes (number
of lines of code) and executables ... I brought one of the O'Reilly
Python books and a copy of PiL to a meeting and pointed out the
difference in sizes. There is a 5:1 difference in size. It was
one of those demonstrations that management easily understood.