|
On 8/10/2014 12:13 PM, Tim Hill wrote:
Lua didn't have full lexical scoping with true closures until version 5.0--in prior versions references to upvalues were denoted by a prefixed % sigil ( or was it considered a unary operator?). The term "upvalue" itself is historical and probably would not been the term chosen if the concept had been introduced concurrently with lexical scoping, etc. It took me a while to decipher *tm in the 5.1 and subsequent C source code as being an abbreviation for the obsolete term "tag method". IIRC, the even older term "fallback" appears as comments in a place or two even in 5.3 source. None of this account is intended to be critical of anyone, the Lua team least of all: Lua source is a work of art. But knowing some Lua history helps us understand what Lua is now. +1 to Tim for remembering this item. I would heartily recommend spending the time to study the documentation of earlier versions. For those who have both the time and the C skill, the source code of earlier versions is a worthwhile study as well. -- Mike |