The language LUA
started 12/14/2002; 9:22:26 AM - last post 12/16/2002; 9:17:33 AM
|
|
Biep - The language LUA
12/14/2002; 9:22:26 AM (reads: 1227, responses: 3)
|
|
The language LUA |
A language with closures, but not as I know them. Is this whole thing with "frozen variables" and percent signs simply a result of not boxing everything?
Does the Lua style of closures have any advantages over, say, the JavaScript way?
The language has some popularity as a scripting language, e.g. in the adventure game authoring system MAD.
Posted to general by Biep on 12/14/02; 9:36:49 AM
|
|
|
|
Biep - Re: The language LUA
12/14/2002; 9:41:43 AM (reads: 806, responses: 0)
|
|
How I wish someone would write an adventure authoring system with an interface like the one AGS has, and a scripting language such as Lua (or, even better, Scheme)!
|
|
Ehud Lamm - Re: The language LUA
12/15/2002; 3:11:50 AM (reads: 723, responses: 0)
|
|
Is there a direct link to something about these closure-like things?
|
|
Alex Moon - Re: The language LUA
12/16/2002; 9:17:33 AM (reads: 593, responses: 0)
|
|
The next version of Lua (5.0, currently available as an alpha release) will have proper closures. Earlier versions did not have proper closures but had a special syntax for accessing local variables from an enclosing scope when creating a function, however the value of these variables was evaluated at function creation time, rather than at function execution time.
You can get more details here http://www.lua.org/manual/manual.html#4.6 and here http://lua-users.org/wiki/LuaScoping
|
|
|
|