[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Lua registry, environment, and threads.
- From: steve donovan <steve.j.donovan@...>
- Date: Sat, 9 Jan 2010 09:34:03 +0200
On Fri, Jan 8, 2010 at 9:19 PM, Miles Bader <miles@gnu.org> wrote:
> 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?
Totally. setfenv and getfenv are important 'back room boys' in Lua
5.1. Once you get the concept, they suddenly open up a universe of
possibilities.
So, I don't quite understand why easily accessing the function
environment has become an outdated/deprecated concept.
As for 'in module(...) do', yes the syntax makes sense. But years of
programming language design practice are against it. The idea of
separate 'compilation units' occupying their own namespace is well
established, e.g. 'package' in Java.
steve d.
- References:
- Lua registry, environment, and threads., Christian Tellefsen
- 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
- Re: Lua registry, environment, and threads., Miles Bader