Lua
Historical Overview of the Language
Lua is a multi-paradigm language, supporting various programming styles, that was created to extend software applications. Inspired by SOL (Simple Object Language) and DEL (Data-Entry Language), Lua has grown to be a language used in many unexpected ways. Brazilian Professors Roberto Lerusalimschy, Luiz Henrique de Figueiredo, and Waldemar Celes created Lua in 1993 because they were unable to get computer software abroad with Brazil’s strong trade barriers.
Advantages of Lua
Minimalistic and Easy to Grasp
Lua is designed to be easy to grasp as it only contains 21 key terms and has a short learning curve compared to other languages. While it is unlikely that we will create the next innovation in graphics with Lua, it is a great language for beginners as it is less overwhelming compared to other popular languages.
Performant and Customizable
Lua is often thought to beat Python in terms of performance. Its high-performance output plays a role in its popularity.
Customizable and Powerful for Developers
With the control provided by the language, developers can create useful programming frameworks, tools, and other resources according to their needs.
For example, Lua’s automatic garbage collection allows developers to focus on programming while forgetting about garbage collection. Additionally, Lua provides the ability for programmers to control how the garbage is collected.
Common Uses of Lua
Game development
- Due to its simple syntax, Lua is often used for game development, though it does tend to lack in graphics and advanced operations. Some popular games that use Lua, or a modified version of it, are ROBLOX, Garry’s Mod, and Civilizations V.
- Lua is especially useful for game development because it can be used as an “extension language”, meaning that it can be embedded in most other platforms or systems.
Software Applications using Lua
- Adobe Photoshop Lightroom’s user interface is built with Lua.
- Celestia, an astronomy educational program, was developed in Lua.
- MySQL Workbench’s extensions and add-ons are created in Lua.
- WeeChat IRC client allows scripts to be written in Lua.
Extensions/Compatibility
- Lua can be used to add to any platform that supports C, C#, C++, and Java programming languages.
- Lua can be used to enhance programs written in other languages.
Lua Concepts
- Arrays
- Comments
- Conditionals
- Coroutines
- Data Types
- Functions
- Iterators
- Mathematical Library
- Operators
- Strings
- Tables
- Variables
Lua contributors
abereFejiro99534096505 contributions- noahpgordon4 contributions
laisvigas4 contributions
AngelAv14 contributions
EddyCkan4 contributions- Brag2gr83 contributions
- qI64733 contributions
krushnarout3 contributions
ivaaane2 contributions
array31099276092 contributions
hP31889415802 contributions
THE-Spellchecker2 contributions- deenovita2 contributions
- micro00833717462 contributions
- susheelthapa1 contribution
- siren20771 contribution
- ElMurimi1 contribution
- shaeeb07936572401 contribution
- Atreay1 contribution
- object06166085881 contribution
CaupolicanDiaz1 contribution
regantewksbury1 contribution- StevenSwiniarski1 contribution
- mehalter1 contribution
Sriparno081 contribution- rhysfirkins1 contribution
findlang1 contribution- MamtaWardhani1 contribution
- jamal71711 contribution
EbrahimAA1 contribution
Contribute to Docs
- Learn more about how to get involved.
- Submit feedback to let us know how we can improve Docs.
Learn Lua on Codecademy
- Learn the basics of Lua, a general-purpose programming language used for building games, web apps, and developer tools.
- Beginner Friendly.4 hours