News for hackers. Stuff that matters.
Re:The Novelties of Lua 5.2 Roberto Ierusalimschy (pdf slide... by carterschonwald on Saturday December 31, 2011 @12:04PM (#3411250)
What this leaves me wondering is : what are the continuation semantics for the gotos? Without that part it's hard to know if "ill formed" gotos that result in trying to execute expressions with undefined variables can happen or not.
Re:The Novelties of Lua 5.2 Roberto Ierusalimschy (pdf slide... by justincormack on Saturday December 31, 2011 @01:11PM (#3411423)
A label is visible in the entire block where it is defined (including nested blocks, but not nested functions).

A goto may jump to any visible label as long as it does not enter into the scope of a local variable.

This can be determined statically.

Re:The Novelties of Lua 5.2 Roberto Ierusalimschy (pdf slide... by carterschonwald on Saturday December 31, 2011 @02:34PM (#3411618)
ok, so the semantics for lua goto's is to enter at the start of smallest enclosing block that has no free variables in the current environment? Or to statically reject code that tries to do so? That doesn't sound quite accurate, unless you're saying that lua does some static analysis before execution, which I was not aware of.
Re:The Novelties of Lua 5.2 Roberto Ierusalimschy (pdf slide... by Dylan16807 on Saturday December 31, 2011 @02:43PM (#3411642)
Lua compiles to a simple bytecode. It makes sure gotos are valid during this compilation.

It jumps directly to the label, and can't skip forward over the declarations of variables that are in scope at the label.

Re:The Novelties of Lua 5.2 Roberto Ierusalimschy (pdf slide... by carterschonwald on Sunday January 01, 2012 @10:07PM (#3414611)
cool. Thanks for the info. Where are this and other features nicely documented?
Re:The Novelties of Lua 5.2 Roberto Ierusalimschy (pdf slide... by Dylan16807 on Monday January 02, 2012 @01:37PM (#3416817)
I would suggest reading The Implementation of Lua 5.0

http://www.lua.org/doc/jucs05.pdf