Spokes.wiki Search About
Computer Language source ↗ source url updated Thu Aug 06 2026 00:00:00 GMT+0000 (Coordinated Universal Time)

Lua

Roberto Ierusalimschy, Luiz Henrique de Figueiredo and Waldemar Celes built Lua in 1993 at PUC-Rio’s Tecgraf, under a constraint the article states outright: Brazilian trade barriers made foreign software hard to buy, so the group wrote its own. The goals were speed, portability, extensibility and ease of use, for a language meant to be embedded in an application rather than to stand alone. Compiles to bytecode on a register-based VM; garbage collected; first-class functions and closures with lexical scope; coroutines for cooperative multitasking; a stack-based C API for embedding. MIT licence from 5.0. LuaJIT covers 5.1 with JIT compilation, and Roblox’s Luau derivative adds gradual typing. Deployed in Roblox, Garry’s Mod and Dota 2, and outside games in Redis, Neovim, Nginx and MediaWiki’s Scribunto.

T2 — third-party encyclopaedic.

One data structure

The corpus has languages that remove a choice — go‘s whole pitch — but Lua removes a category. Tables are the only composite type: heterogeneous associative arrays that serve as arrays, records, namespaces and, through metatables, objects with inheritance. Object orientation is not a feature here, it is a convention that tables permit, which is the same argument common-lisp makes about CLOS from the opposite end. Common Lisp says the language can be extended until it has an object system; Lua says the primitive is general enough that you build one and the language never learns about it.

Embeddability as the design constraint, not a feature

emacs-lisp arrived in the same batch as the other language whose host is an application, and the pair splits cleanly. Emacs Lisp exists to make one application malleable and is inseparable from it. Lua is built to be dropped into any C program — a small VM, a stack-based API, a licence chosen so vendors would not think twice (hosted-language). The result is that the corpus’s most widely embedded language is one most of its users never chose: Roblox and Neovim users meet Lua because the application shipped it.

Coroutines also give concurrency-model a position it lacked. go schedules cheap tasks, erlang isolates them, nodejs runs one loop, rust proves the sharing safe. Lua hands scheduling to the program itself — yield and resume, no preemption, no runtime deciding. That is the cheapest possible answer, and it is the right one for a language embedded in someone else’s main loop.

Version incompatibility as policy

Lua versions break compatibility, which is why LuaJIT sits on 5.1 and stayed there, and why Luau forked. Every other language here treats the installed base as a constraint — php patches four branches on one day, c and javascript guard backward compatibility as a standards commitment. Lua’s small size makes breaking cheap enough to accept, and the corpus can now say what that costs: the ecosystem pins itself to an old release and a company forks the language.

emacs-lisp · hosted-language · concurrency-model · common-lisp · javascript · php · programming-language · synthesis