lua-users home
lua-l archive

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

On Mon, 01 Mar 2010 18:10:39 +0200, Nevin Flanagan <> wrote:

While the philosophical change is consistent with the change to closures, how would you distinguish between upvalues associated with the userdata itself, and upvalues associated with the closure invoked to access the userdata?

I'm sorry I don't follow your argument.
You can already do that in Lua 5.1, can't you?
In Lua 5.1 there is a way how to distinguish between environments
of closure and userdata. There is also a way how to access upvalues
of arbitrary value (see lua_getupvalue).
The patch I posted is about changing how values associated with userdata
are stored internally. Just because I wanted to test it quickly I reused
upvalue access functions.

I'm in favor of such a change if it can make the model simpler and more consistent, but right now it sounds like it creates two analogous systems for little added benefit.

I'm sorry, I don't understand what is the second analogous system
you are talking about here.