lua-users home
lua-l archive

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

On 01/07/2011 04:59 PM, Roberto Ierusalimschy wrote:

Does anyone still use references in real applications? For what?

Luatex uses references for various things. The most interesting
application is that, because we do a lot of keyword processing,
a whole bunch of lua strings for often-occuring keywords is created
at application startup. The pointer addresses and a registry index
key for each is stored so we can do both fast comparison with user-
supplied keywords (via the pointer) and dictionary output generation
using these predefined keywords as names (via a rawgeti on the
registry index).

Best wishes,