Misplaced Pages

Lua (programming language)

Article snapshot taken from[REDACTED] with creative commons attribution-sharealike license. Give it a read and then ask your questions in the chat. We can research this topic together.

This is an old revision of this page, as edited by 194.221.211.68 (talk) at 14:57, 14 May 2003. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Revision as of 14:57, 14 May 2003 by 194.221.211.68 (talk)(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)


The Lua programming language is a bytecode interpreted lightweight glue language designed with extensible semantics as a primary goal. It is quite similar to Python in its simplicity, but it is considerably lighter. For example, while it is quite easy to use Lua to write programs in an object oriented style, there is no built in support for the paradigm so that object-oriented semantics need to be extended manually somehow.

An interesting feature of Lua is that it has only one data structure, the table. Tables can be used as arrays, hashtables or structures with named fields, and can also simulate namespaces. There is a similar level of simplicity in the atomic datatypes -- all arithmetic is done in double-precision floating point, for example.

Lua is fast compared to most other bytecode interpreted scripting languages, and is suitable for writing stand-alone applications (although there are nowhere near as many libraries available as there are for Perl, Python or Tcl).

Like Tcl, Lua was designed primarily as an extension language which could be linked into C applications and used to extend their functionality by nonprogrammers. One of the interesting features of the language is that it is both a language and an API for accessing the runtime state of the language's interpreter from a host C program. This means that most Lua programs run as part of a host application which is usually written in C or C++. The API allows different parts of a program to be written in C and Lua and communicate values, functions, and execution between them. A function in Lua can call a function in C and vice versa.

Lua was created by the Computer Graphics Technology Group of the Pontifical Catholic University of Rio de Janeiro in Brazil. It is released as free software under BSD-like license terms, which is non-copyleft liscence. It has beeen used in many commerical applications (e.g. in Lucas Arts' Escape from Monkey Island adventure game).

External links


In Roman mythology, Lua was the goddess the soldiers sacrificed captured weapons to. Lua means also 'moon' in Portuguese.

Lua (programming language) Add topic