[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Upvalues question
- From: Dibyendu Majumdar <mobile@...>
- Date: Sun, 24 Mar 2019 22:16:55 +0000
On Sun, 24 Mar 2019 at 20:58, Dibyendu Majumdar <mobile@majumdar.org.uk> wrote:
>
> I hadn't realized that when an upvalue is created, it is recursively
> created up the tree of functions until the function defining the local
> variable is reached. I am not sure of the question I am asking ... I
> was wondering whether upvalues have function scope, i.e. each function
> has a list of unique upvalues where each upvalue is identified by name
> only.
>
> Hope the question makes sense.
I believe this is referred to as 'flat closure' in 'The Implementation
of Lua 5.0'. I didn't realize what this actually means until recently.