[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: C API question
- From: Doug Currie <doug.currie@...>
- Date: Fri, 7 Jan 2011 11:33:06 -0500
On Jan 7, 2011, at 10:59 AM, Roberto Ierusalimschy wrote:
> Does anyone still use references in real applications? For what?
LuaSQLite ( http://luaforge.net/projects/luasqlite/ ) uses references for callbacks. This code was originally written many years ago (2002-4?) but is still maintained and in widespread use. It could have been converted to use userdata environments or a string-keyed shared-library upvalue table over the years, but "if it ain't broke, don't fix it" (we were too lazy!). If references went away, we could certainly convert the code.