Why Lua Is Named After the Moon in Portuguese
Of all the programming language names in wide use, Lua may be the one most people repeat without ever thinking about what the word means. In Portuguese, Lua means moon, and the choice was no accident. It was a deliberate counterpoint to the name of the language it replaced, SOL, which means sun in Portuguese. The creators chose Lua, the moon, as a playful continuation of a naming theme started by an earlier research project, and the name ended up being one of the best short brand names in all of software.
The story starts at the Pontificia Universidade Catolica do Rio de Janeiro, PUC-Rio, in the early 1990s. A group of Brazilian researchers, led by Roberto Ierusalimschy with Luiz Henrique de Figueiredo and Waldemar Celes, had built an earlier configuration and description language for the university's oil industry and graphics projects. That language was called SOL, Portuguese for sun. It served a real purpose, but it proved too rigid and specialized for the growing list of uses they wanted to cover. The team decided to build a cleaner, more general scripting language that could be embedded in larger systems, and they needed a name for the new project.
The naming decision was intentionally tied to history. Since the previous language was called Sol, the sun, the new language would be named after the sun's counterpart in the sky, the moon, Lua. It is one of those small decisions that quietly signals continuity while also giving the project a fresh, independent identity. They had no particular interest in marketing at the time, the language was primarily an internal research tool, but the name turned out to be short, pronounceable in almost every language, and easy to search for, all accidental advantages that proved enormously useful later.
Lua itself was designed to be ruthlessly small and embeddable. The focus from the start was on creating a language that could tuck into another application, expose its functions through the C API, and be extended and called from host code. Where many languages try to be the center of your project, Lua is comfortable as a supporting actor, a tool for configuration, scripting, and business logic that lives inside a larger C or C++ program. The whole implementation fits in roughly thirty thousand lines of portable C, which is part of why it shows up everywhere from game engines to Nginx to Redis, riding quietly inside one host or another.
The moon name carries a certain poetic accuracy. Just as the moon reflects the light of the sun, Lua is often a reflector of the host application that wrote it. It does not impose its own world; it adapts to whatever environment it is embedded in, exposing the host's functionality to script writers and letting them express behavior declaratively or procedurally. That design philosophy, light, humble, and extremely capable, is embodied in the name itself, a tiny word that packs more meaning than its three letters suggest.
For a working programmer, the name is a good reminder that the character of a language flows from how its creators meant it to be used. Lua was never trying to be the largest language in the room. It was built to be small, fast, and hospitable to embedding, and every design decision, the single table data structure, the one-based indexing, the compact runtime, grew out of that intent. Knowing the sun and moon story makes the whole design ethos more legible. You are not just running code; you are working with a tool shaped by a specific, coherent vision, one that happened to begin with a thoughtful choice of name.
So the moon in Lua is not a decorative flourish. It is a respectful nod to Sol, its predecessor, and an honest description of the language's role as a small, brilliant light that shines inside far larger systems. It is a rare case where the naming story is short, precise, and genuinely meaningful, and it is well worth keeping in mind the next time you drop Lua into a project.