当前位置:网站首页>Lua notes

Lua notes

2022-06-22 05:02:00 Justinmars

Lua Is a lightweight and compact scripting language , Using standard C Language written and open in source , It's designed to be embedded in the application , This provides the application with flexible extension and customization capabilities .Lua It's the Catholic University of Rio de Janeiro, Brazil (Pontifical Catholic University of Rio de Janeiro) A research group in 1993 Year development .
Lua characteristic
● Lightweight : It uses standard C Language written and open in source , After compiling, it's only over 100 K, It can be easily embedded in other programs .
● Scalable : Lua Provides a very easy to use extension interface and mechanism : By the host language ( Usually C or C++) Provide these functions ,Lua They can be used , It's like a built-in feature .
● Other characteristics :
○ Support process oriented (procedure-oriented) Programming and functional programming (functional programming);
○ Automatic memory management ; Only one common type of table is provided (table), It can be used to implement arrays , Hashtable , aggregate , object ;
○ Language built-in pattern matching ; Closure (closure); Function can also be seen as a value ; Provides multithreading ( Collaborative process , Threads not supported by the operating system ) Support ;
○ Through closures and table It can easily support some of the key mechanisms needed for object-oriented programming , For example, data abstraction , Virtual functions , Inheritance and overloading, etc .
Lua Environmental installation
Linux Installation on system
Linux & Mac Installation on Lua Very simple installation , Just download the source package and decompress and compile it at the terminal , This article uses 5.3.0 Version to install :
curl -R -O http://www.lua.org/ftp/lua-5.3.0.tar.gz tar zxf lua-5.3.0.tar.gz

原网站

版权声明
本文为[Justinmars]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/173/202206220457412809.html