[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: a new proposal for environments
- From: "Juris Kalnins" <juris@...>
- Date: Tue, 02 Mar 2010 09:16:37 +0200
On Mon, 01 Mar 2010 18:10:39 +0200, Nevin Flanagan <Alestane@comcast.net>
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.