[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: "dynamic" closures
- From: spir <denis.spir@...>
- Date: Mon, 30 Nov 2009 18:41:25 +0100
Follow-up. Just for curiosity.
function f()
local t = {1}
function g()
print (t[1])
end
g() --> 1
t = {2}
g() --> 2
end
f()
This seems to show upvalues are referenced by names (what I called symbolic reference) rather than by address (pointer reference). Else the full replacement of t would not be seen by the closure, as its address has changed.
Is this interpretation correct?
Denis
________________________________
la vita e estrany
http://spir.wikidot.com/