English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
Lua is an open-source language built on top of the C language. Lua has its value on multiple platforms ranging from large server systems to small mobile applications. This tutorial covers various topics, from the basics of Lua to its applications in various applications.
Lua is a lightweight and compact scripting language written in standard C language and released as source code. Its design purpose is to be embedded in applications, thereby providing flexible extension and customization features for applications.
Lua is a research group at the Pontifical Catholic University of Rio de Janeiro, Brazil. 1993 Developed in the year, the members of this group include: Roberto Ierusalimschy, Waldemar Celes, and Luiz Henrique de Figueiredo.
Its design purpose is to be embedded in application programs, thus providing flexible extension and customization features for application programs.
Lightweight: It is written in standard C language and open-source in source code form, compiled to only over a hundred K, which can be easily embedded in other programs.
Extensible: Lua provides very easy-to-use extension interfaces and mechanisms: by the host language (usually C or C++) Providing these features, Lua can use them as if they were built-in features.
Other Features:
Supports procedural programming (procedure-oriented) programming and functional programming (functional programming);
Automatic memory management; only one general type of table (table) is provided, which can be used to implement arrays, hash tables, sets, and objects;
Built-in pattern matching; closures (closures); functions can also be seen as values; provide multi-threading (coroutines, not supported by the operating system's threads);
Through closures and table, it can easily support some key mechanisms required for object-oriented programming, such as data abstraction, virtual functions, inheritance, and overloading, etc.
Game development
Independent application scripts
Web application scripts
Extensions and database plugins such as MySQL Proxy and MySQL WorkBench
Security systems, such as intrusion detection systems
In Lua, by creating a module and table, it can easily support some key mechanisms required for object-oriented programming, such as data abstraction, inheritance, and overloading, etc.
Next, we will use Lua to output 'Hello World!'.
print("Hello World!")Test and see ‹/›