lua-users home
lua-l archive

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


On Nov 21, 2013, at 10:59 PM, Marc Lepage <mlepage@antimeta.com> wrote:

> Is a module that is a function (not a table) a reasonable thing?

Sure, why not.

> Is it a common idiom (in this case)?

...

> Are there alternatives?

A callable table, i.e. one with a __call metamethod:

http://lua-users.org/wiki/FuncTables