[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Lua registry, environment, and threads.
- From: Miles Bader <miles@...>
- Date: Sat, 09 Jan 2010 04:19:00 +0900
Luiz Henrique de Figueiredo <lhf@tecgraf.puc-rio.br> writes:
>> It is a pity though that trusted config file loading would have to use
>> debug library now... I understand that load{file/string} would not be
>> affected by "in" construction. Am I right?
>
> There'll be a new function, loadin:
> http://lua-users.org/lists/lua-l/2010-01/msg00179.html
>
> So, no need to use the debug library.
I've found the split between actual loading and setfenv useful -- e.g.,
it lets you evaluate a loaded file in different contexts. It seems that
you're going to have to define multiple new load functions (not just
but "loadfilein", "loadstringin", ...); isn't just having a single
setter nicer?
Also, what about getfenv? It currently allows a lua function to copy
its caller's environment, which is useful for e.g., writing an
"include()" function.
-Miles
--
We live, as we dream -- alone....
- References:
- Lua registry, environment, and threads., Christian Tellefsen
- Re: Lua registry, environment, and threads., Patrick Donnelly
- Re: Lua registry, environment, and threads., Roberto Ierusalimschy
- Re: Lua registry, environment, and threads., Christian Tellefsen
- Re: Lua registry, environment, and threads., Roberto Ierusalimschy
- Re: Lua registry, environment, and threads., Mark Hamburg
- Re: Lua registry, environment, and threads., Patrick Donnelly
- Re: Lua registry, environment, and threads., Roberto Ierusalimschy
- Re: Lua registry, environment, and threads., Leo Razoumov
- Re: Lua registry, environment, and threads., Alexander Gladysh
- Re: Lua registry, environment, and threads., Luiz Henrique de Figueiredo