[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: "dynamic" closures
- From: steve donovan <steve.j.donovan@...>
- Date: Mon, 30 Nov 2009 13:23:58 +0200
On Mon, Nov 30, 2009 at 1:21 PM, Patrick Donnelly <batrick@batbytes.com> wrote:
> On Mon, Nov 30, 2009 at 6:12 AM, spir <denis.spir@free.fr> wrote:
> I believe you meant to use locals here:
Yes, only locals get captured as the upvalues of a closure, so Lua
programmers would regard this as a program bug, not a language bug!
Globals do their own thing, another reason why they're avoided as much
as possible.
steve d.