Table of Contents for Programming Languages: a survey


Because it is so well-liked, Lua gets its own chapter.



Retrospectives and whitepapers:

Influences: SOL, DEL, "Lua 1.0 was designed in such a way that its object constructors, being then slightly different from the current light and flexible style, incorporated the data-description syntax of SOL (hence the name Lua – sol is Portuguese for sun; lua is moon). Lua syntax for control structures was mostly borrowed from Modula (if, while, repeat/until), but also had taken influence from CLU (multiple assignments and multiple returns from function calls, as a simpler alternative to reference parameters or explicit pointers), C++ ("neat idea of allowing a local variable to be declared only where we need it"[3]), SNOBOL and AWK (associative arrays). In an article published in Dr. Dobb's Journal, Lua's creators also state that LISP and Scheme with their single, ubiquitous data structure mechanism (the list) were a major influence on their decision to develop the table as the primary data structure of Lua.[5] Lua semantics have been increasingly influenced by Scheme over time,[3] especially with the introduction of anonymous functions and full lexical scoping." --


Tours and tutorials:



Types: "There are eight basic types in Lua: nil, boolean, number, string, userdata, function, thread, and table." --



Lua uses a register machine VM with bytecode.


Local variable storage and operand stack

Lua uses the common system of stack frames, where each stack frame contains local variables[25][26]. Lua bytecode has instructions which directly access local variables (in a manner similar to registers). If closures go out of scope while they are still references by other functions, the relevant variables are moved to the heap at that time[27].


Alternate implementations