lua-users home
lua-l archive

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


On 10/17/11, Josh Simmons <simmons.44@gmail.com> wrote:
> module...
> Localise external functions so they remain accessible after the call
> to module or use seeall to make _G the __index of the new
> environment's metatable, call module creating a global table, making
> it the environment of the current block so following global sets and
> gets happen to the module table not the global environment.
>
> not module...
> return a table with exports.
>
> I just don't understand _why_ you want the functional equivalent of
> module 'foo' when all you ever need is trivial and much more obvious
> without it.
>
>

Indeed. The Table(tm) helps here as well :-)

Actually, what I don't understand is dofile; I always find it wierd
that it can't be passed arguments...