[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Simulating Lua states in Lua with only 250 lines of code
- From: Tim Hill <drtimhill@...>
- Date: Wed, 24 Jun 2015 22:16:10 -0700
> On Jun 24, 2015, at 10:56 AM, Soni L. <fakedme@gmail.com> wrote:
>
>>
> You can't get enclosing closures.
>
> function f()
> -- _ENV = _ENV -- redundant because we're making g a global, so we need _ENV
> function g() (""):doSomething() end -- function has no _ENV
> end
> -- good luck getting the env of g :P
>
> --
> Disclaimer: these emails are public and can be accessed from <TODO: get a non-DHCP IP and put it here>. If you do not agree with this, DO NOT REPLY.
>
function g() (""):doSomething(_ENV) end
—Tim