lua-users home
lua-l archive

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


> I would rephrase 2. to: "a module should be fully self contained, not
> creating or using globals other than the base libraries"

Surely a module can use other modules it requires. If all required modules
behave well, then the module in question can do
	local random=require"random"
and all is well. But if it require modules that only set a global variable,
then the module in question can only do
	require"random"
	local random=random
or use the global "random".