lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

On Fri, Jan 8, 2010 at 9:19 PM, Miles Bader <> 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

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.