Presentation is loading. Please wait.

Presentation is loading. Please wait.

Lua By: Michael Coffman Peter Sussman. History Lua means ‘moon’ in Portuguese First appeared in 1993 Created by Roberto Ierusalimschy, Luiz Henrique de.

Similar presentations


Presentation on theme: "Lua By: Michael Coffman Peter Sussman. History Lua means ‘moon’ in Portuguese First appeared in 1993 Created by Roberto Ierusalimschy, Luiz Henrique de."— Presentation transcript:

1 Lua By: Michael Coffman Peter Sussman

2 History Lua means ‘moon’ in Portuguese First appeared in 1993 Created by Roberto Ierusalimschy, Luiz Henrique de Figueiredo, and Waldemar Celes at Pontifical Catholic University of Rio de Janeiro in Brazil Developed because Brazil had a strong policy against foreign trade Primary influence: c++

3 Features Light, multi-paradigm language Highly portable: can be compiled to run on Linux, Windows, Macintosh Very small: complete language occupies less than 1 megabyte Dynamically typed; eight types, boolean, number, string, nil, function, userdata, thread, table Also has automatic garbage collection

4 Features Only data structure is the table, which can be used to implement arrays, lists, etc. Can run code in pure interpretation or intermediate byte code (such as Java) Can call functions written in C or Lua Arrays do not have to be only one type Variables are global unless otherwise declared

5 Code Samples

6

7

8 Sample Runs

9

10 Readability Pros –Functions are well defined and easy to follow –Similar to C syntax –Very little parentheses or brackets Cons –Most blocks of code end in ‘end’ –No spaces between terminals and nonterminals –Variables don’t have declared types, only their values do

11 Writability Pros –Few keywords –All blocks of code end with ‘end’ –Syntax similar to C Cons –All blocks of code end with ‘end’ –Limited data types

12 Reliability Pros –One of the most reliable languages on the market Cons –Easy to get lost in the nested ‘end’ statements leading to programming errors

13 Cost Pros –Free –Small and portable: Lua can be used from a USB drive from one machine to the next, and across multiple OS’s Cons –Lua is not considered a mainstream language, so training might cost a fair amount

14 Who Uses Lua Blizzard Entertainment: World of Warcraft scripting Cisco Systems Maxis/EA: SimCity 4 Adobe: Adobe Photoshop Lightroom Many video games use Lua

15 References


Download ppt "Lua By: Michael Coffman Peter Sussman. History Lua means ‘moon’ in Portuguese First appeared in 1993 Created by Roberto Ierusalimschy, Luiz Henrique de."

Similar presentations


Ads by Google