[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Why don't modules have implicit access to globals by default?
- From: David Manura <dm.lua@...>
- Date: Mon, 5 Nov 2007 22:04:15 +0000 (UTC)
Matt Campbell writes:
> Why does one have to pass package.seeall to module() to give a module
> implicit access to the global table?
package.seeall is not required to access the global table, nor even to access it
implicitly, and I recommend not using package.seeall, but it is one way of doing
so for reasons described in Chapter 15 "Modules and Packages" in "Programming in
Lua, 2nd Ed" (an except of Chapter 15 is online:
> Is use of package.seeall
> discouraged? Or was this done to simplify the implementation?
Here's one opinion on the subject: