官术网_书友最值得收藏!

  • Lua Quick Start Guide
  • Gabor Szauer
  • 206字
  • 2021-08-05 10:30:31

What Lua is

Lua is a powerful, fast, lightweight, embeddable scripting language. The Lua virtual machine and interpreter are written in C. As a language, Lua is easy to learn. It contains 21 keywords, which makes the language rather small. Lua is also easy to read and understand, as its syntax makes it similar to English. For example, consider the following code snippet:

if not hero:IsAlive() then
GameOver();
end

This code is easy to read, and I bet you can take an intuitive guess at what it does. Lua is not only easy to read, it is also very powerful. The real power of Lua comes from its extensible nature. Programming constructs such as object-oriented programming (OOP) can be implemented in Lua, even though the language has no native support for objects.

At the time of writing, Lua has 14 versions; this book will focus on Lua 5.2.4. The latest version is 5.3; the main difference between 5.2 and 5.3 is that 5.3 contains support for explicit integers and bitwise operation.

While this book covers everything needed to get started with Lua programming, it never hurts to have more resources. The first edition of Programming In Lua can be read online, for free, at https://www.lua.org/pil/contents.html.
主站蜘蛛池模板: 沅陵县| 海阳市| 莲花县| 武夷山市| 洞头县| 睢宁县| 舒兰市| 错那县| 璧山县| 景德镇市| 临清市| 乐亭县| 策勒县| 龙山县| 昆山市| 册亨县| 泰州市| 呼图壁县| 桂林市| 界首市| 黔西县| 秦皇岛市| 祁连县| 萝北县| 乐至县| 阜康市| 虹口区| 信宜市| 云林县| 洮南市| 龙门县| 贵港市| 阿克陶县| 忻州市| 五寨县| 盘山县| 凯里市| 抚顺县| 溧水县| 永和县| 马边|