lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On 8/10/2014 12:13 PM, Tim Hill wrote:

On Aug 10, 2014, at 12:30 AM, Sean Conner <sean@conman.org> wrote:

 Lua doesn't use sigils nor is its parser capable of dealing with keywords
as identifiers.  So, in order to prevent code breakage, some of us Lua users
are conservative when it comes to adding new keywords.

I seem to recall that very early versions of Lua made some use of sigils, but I could be wrong on this.

—Tim

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