Lua (programming language)

Edit · View history

Lua (programming language)

Lua is a lightweight, high-level, multi-paradigm programming language designed primarily for embedded use in applications. Created in 1993 at the Pontifical Catholic University of Rio de Janeiro in Brazil, Lua combines procedural, functional, and object-oriented features with a simple yet powerful C API. Its name means "moon" in Portuguese.

Lua is widely used as a scripting language in video games, web servers (e.g., NGINX with OpenResty), image processing (ImageMagick), and embedded systems. Its reputation for speed, small footprint, and ease of integration has made it a popular choice for extending software.

Features

History

Lua was developed by Roberto Ierusalimschy, Luiz Henrique de Figueiredo, and Waldemar Celes to provide a flexible scripting language for a petroleum data‑processing system. Early versions (1.0–2.x) were released in the 1990s. Lua 3.1 (1998) introduced lexical scoping. Lua 4.0 (2000) added full syntax for object‑oriented programming. The major Lua 5.0 (2003) brought coroutines, metatables, and a new registry. Lua 5.1 (2006) introduced modules, the C API for upvalues, and a standard library with weak tables. Lua 5.2 (2011) added `goto`, bitwise operators, and ephemeron tables. Lua 5.3 (2015) introduced integers and a basic UTF‑8 library. Lua 5.4 (2020) added generational GC, const variables, and to‑close variables.

Usage

Lua is the de‑facto scripting language for the Roblox game platform. It is also used in World of Warcraft, Angry Birds, Adobe Photoshop Lightroom, and the LÖVE game framework. Its reference implementation is written in C; LuaJIT is a popular just‑in‑time compiler for performance‑critical applications.

See also