博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Lua学习系列(一)
阅读量:5356 次
发布时间:2019-06-15

本文共 2515 字,大约阅读时间需要 8 分钟。

从现在开始,打算学习一门新的脚本语言-lua.

1.什么是lua?

   a) lua1

• Lua 1.0 was implemented as a library, in less then 6000 lines of C

• “The simplest thing that could possibly work”: compiler used lex and yacc, simple stack based virtual machine, linked lists for associative arrays

• Some of the syntax still lives in the current version:

• Lua 1.1 just added a reference manual, and a cleaned-up C API

      b)lua2

• From Lua 2.1 (February 1995) to Lua 2.5 (November 1996)

• Object oriented programming via delegation

• Pattern matching in the standard library

• Hooks for writing debuggers

• First users outside Tecgraf, with papers in Software: Practice and Experience and Dr. Dobb's Journal

• LucasArts begins using Lua in games

  c)lua3

• From Lua 3.0 (September 1997) to Lua 3.2 (September de 1999)

• Anonymous functions and a restricted form of closures give better support for functional programming, which would mature in Lua 5

• Major refactoring in the source code

• The next version brings big changes to the C API, so some applications from this time still embed this version of Lua

  d)lua4

• A single version, Lua 4.0, released on November 2000

• C API completely redone, using the stack model that we will see in this course

• An application can now have several independent instances of the Lua interpreter

• The standard library has been rewritten to use just the public C API, reinforcing the separation between the core and the standard libraries

  e)lua5

• From Lua 5.0 (April 2003) to Lua 5.2, the current version, released December 2011

• Maturity of the language, and the release of the “Programming in Lua” book

• Several big changes: metatables, true lexical scope for anynonymous functions, the module system, coroutines, lexical environments…

• Changes in the implementation: more efficient register-based virtual machine, replacing the stack-based one, an incremental garbage collector for shorter pauses

• The implementation now has around 20.000 lines of code, 3x Lua 1.0

  f)lua today

• Current license is the MIT license, free for both non-commercial and commercial use

• Open language, but closed development: new releases are still the responsibility of the three original authors

• Big community participation in the lua-l mailing list and the lua-users wiki

• A package manager, LuaRocks, and alternative Lua implementations: LuaJIT, JVM, .NET, JavaScript...

• Several frameworks for developing mobile games: Corona, Gideros, Codea, MOAI...

2.lua应用在哪里? 

转载于:https://www.cnblogs.com/oxspirt/p/5892430.html

你可能感兴趣的文章
C#中Monitor和Lock以及区别
查看>>
【NOIP2017】奶酪
查看>>
$ 一步一步学Matlab(3)——Matlab中的数据类型
查看>>
5.6.3.7 localeCompare() 方法
查看>>
Linux下好用的简单实用命令
查看>>
常用web字体的使用指南
查看>>
描绘应用程序级的信息
查看>>
poj2406-Power Strings
查看>>
2018/12/18 JS会像Linux一样改变编程
查看>>
php环境搭建脚本
查看>>
FTP主动模式与被动模式说明
查看>>
php 编译常见错误
查看>>
MES架构
查看>>
【Python3 爬虫】15_Fiddler抓包分析
查看>>
高性能JavaScript-JS脚本加载与执行对性能的影响
查看>>
关于标签之间因为换行等问题造成的空白间距问题处理
查看>>
hdu 2767(tarjan)
查看>>
sklearn之分类模型混淆矩阵和分类报告
查看>>
MySQL各存储引擎
查看>>
项目--简单导出CSV文件
查看>>